Skip to content

Instantly share code, notes, and snippets.

@codingoutloud
Created January 29, 2018 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingoutloud/5c594b2a6b2761d9c436c39dd86bcb7c to your computer and use it in GitHub Desktop.
Save codingoutloud/5c594b2a6b2761d9c436c39dd86bcb7c to your computer and use it in GitHub Desktop.
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