How to: Get Public IP address with CMD

You are on a server or have a screen sharing session and don’t want to open a ‘whatismyip’ website with all the advertisements.

It can be a very hassle to open a website with a lot of advertisements under the eye of a customer and on a server it just don’t feel right. With a NSlookup in CMD we can get the public IP very easily within two steps.

  • Open CMD as an admin of a desired machine
  • Fill in the following command

Voila, under the section “address” of “” you will find the public IP.

Share this: