If you need to know what the public IP being used in powershell, you can use this command:
Invoke-RestMethod -Uri "http://ipinfo.io/ip"
(Invoke-WebRequest -uri "http://ifconfig.me/ip").Content
Invoke-RestMethod -Uri ('http://ipinfo.io/'+(Invoke-WebRequest -uri "http://ifconfig.me/ip").Content)
Similiar command to short the Invoke-WebRequest
is iwr
.
iwr -Uri https://ipinfo.io/ip
(iwr -Uri https://ipinfo.io/ip).content
The website that provide the check IP service.
https://ipinfo.io/ip
https://ifconfig.me/ip
https://icanhazip.com
https://ident.me
https://smart-ip.net/myip