This guide intends to teach you to Find or Check the Public IP Address from PowerShell and CMD command prompt on Windows 10 and Windows 11. Let’s see what is a public IP address and how to find your IP in Windows 10 and Windows 11.
What is a Public IP address in Windows?
As you may know, a public IP address is an IP that you use to access the Internet. It is a unique IP address on the Internet. You need to use a public IP to identify and communicate with the whole world on the Internet.
If you don’t know your Public IP on Windows, you can easily find it from the command line interface. To do this, follow the rest of the article.
Steps To Find Windows Public IP Address From PowerShell and CMD
To check your public IP address, you must log in to your Windows Client system and follow the steps below. In this guide, to show you the guide steps we use Windows 11.
Method 1 – Check Public IP Address From PowerShell
At this point, you need to open PowerShell as an administrator and follow the steps below. To get the IP address, you can easily send a request to the following sites and find it:
For example, you can run the following command in your PowerShell to get your public IP address:
Or you can use the following command:
In your output, you will see an IP that is your public IP address.
In the above commands, you can use one of the sites that you want and find your IP.
Method 2 – Check Public IP Address From Command Prompt
If you want to use a command prompt (CMD), you need to open your CMD as an administrator and follow the steps below.
In CMD, you can use nslookup to find your IP address. To do this, you can run the following command:
nslookup myip.opendns.com. resolver1.opendns.com
In your output, you will see an Address option which is your public IP address.
Or you can simply use the following curl command:
That’s it you are done.
At this point, you have learned to Find or Check your Public IP address in your Windows 10 and Windows 11 from PowerShell and CMD command prompt. Hope you enjoy it.
Also, you may like to read the following guides: