Created
January 29, 2018 20:48
-
-
Save codingoutloud/5c594b2a6b2761d9c436c39dd86bcb7c to your computer and use it in GitHub Desktop.
PowerShell module for IP address tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in some shared module folder, such as /usr/local/share/powershell/Modules | |
Function Get-IpCountry { | |
param([String]$ip="9.9.9.9") | |
$country = Invoke-RestMethod -Method GET -Uri https://ipinfo.io/$ip/country | |
return $country | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment