Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PowerShell module for IP address tools
# 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
You can’t perform that action at this time.