Skip to content

Instantly share code, notes, and snippets.

@Tridy
Last active October 9, 2022 07:29
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 Tridy/af56a797e639024323dd8ca5c93999db to your computer and use it in GitHub Desktop.
Save Tridy/af56a797e639024323dd8ca5c93999db to your computer and use it in GitHub Desktop.
Get the external IP and the country using PowerShell
$json = (Invoke-WebRequest -uri "https://location-api.f-secure.com/v1/ip-country").Content | ConvertFrom-JSON
Write-Output $json.ip
Write-Output $json.country
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment