Last active
October 9, 2022 07:29
-
-
Save Tridy/af56a797e639024323dd8ca5c93999db to your computer and use it in GitHub Desktop.
Get the external IP and the country using PowerShell
This file contains hidden or 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
$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