Get Static/Public IP Address using PowerShell.

HI,Sometime we need to know the static/Public IP address of our internet connections. You may need to incoprate a static ip adress of the user in to some script output. You may be you want to show static IP in some of your in-house WPF PowerShell based GUIs.In my scenerio i need

4.6 Star
4,875 times
Add to favorites
E-mail Twitter Digg Facebook
  • This script works on windows 10
    1 Posts | Last post April 01, 2016
  • Many IPs
    1 Posts | Last post November 05, 2014
    • Hi Aman,
      There are many ips in one interface, and NAT 1:1.
      I´d like test public IP and choose Source local IP, I tried use this object below but I can´t.
      $IPEndPoint = New-Object System.Net.IPEndPoint($InterfaceIP, $InterfacePort)
      $Socket = new-object System.Net.Sockets.TcpClient($IPEndPoint)
  • Need help!!
    1 Posts | Last post November 19, 2012
    • Hi Aman,
      Could you please help me getting static IP address, Subnet Mask, Default Gateway and Pri DNS and Sec DNS from the list of host name.
  • Thanks Rich Prescott
    2 Posts | Last post October 09, 2012
    • Thanks for one liner. It is very useful. And thanks to Aman for the concept.
    • Hi Parmaths,
      You are welcome .
  • PowerShell v3 version
    2 Posts | Last post October 09, 2012
    • ((Invoke-WebRequest "").ParsedHtml.Body.innerHTML -split ': ')[1]
    • Thanks Rich :) 
      But that will work on Powershell V3, Isnt ?