Created
August 7, 2018 17:54
-
-
Save veritas06/1e87b9f52eb464da2ca6038aad5d1687 to your computer and use it in GitHub Desktop.
[PS: Get External IP] PowerShell command to get a user's external IP #PowerShell #IP
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
# Microsoft TechNet: PowerShell One Liner: Get External/Public IP Address | |
# https://gallery.technet.microsoft.com/scriptcenter/Get-ExternalPublic-IP-c1b601bb | |
$ip = Invoke-RestMethod http://ipinfo.io/json | Select -exp ip | |
$ipinfo = Invoke-RestMethod http://ipinfo.io/json | |
$ipinfo.ip | |
$ipinfo.hostname | |
$ipinfo.city | |
$ipinfo.region | |
$ipinfo.country | |
$ipinfo.loc | |
$ipinfo.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment