We hope this article can help you to check your public IP Address using PowerShell command. If you liked this article, then please share with the others. Posted: (1 day ago) Powershell Two-Liner to Get External IP On Unix and Unix-like servers, you can just run curl (assuming curl is installed) and youre done, ( curl -x protocol proxyserver :port if you need to declare an anonymous outbound proxy server). Just use the IP within the URL (ex: ) invoke-restmethod You can also use ipinfo.io to get the IP information about another public IP Address. You can also get additional IP information, including the hostname, using ipinfo.io‘s JSON web service. Specifies an external IP address of the NAT or network interface gateway. function Get-Office365Endpoints: SYNOPSIS: Get the Office 365 Endpoint Information from Microsoft via the new RestFull Webservice (JSON).
There are numerous other services you can call to get the public IP, a few are below: (Invoke-RestMethod -uri ipinfo.io/json).ipĪlso, you can get the detail of your public IP by removing “ip” variable on the command above. You say you have the sender's email address, but want to know the ip so second exmaple here will work. Get-MessageTrackingLog -start -sender Select MessageSubject,Timestamp,Sender,ClientIP.
Getting public IP on troubleshot networking issue is very useful. Especially, there is an issue with accessing your server from the external (public) network. Here is how to get your server’s public IP using PowerShell Invoke-RestMethod Command. Find out Sender and IP based on sender email address or identity. , a public HTTP API for retrieving IP geolocation information (up to 10,000 queries per hour for free) Invoke-RESTMethod, a PowerShell cmdlet for making REST API requests I created a simple function to perform the lookup and return an object, and built that into a script.