Commander

How to find public IP address with PowerShell on Windows 10

What is my public ip address? Here are the steps to find out using a PowerShell command.

PowerShell public IP address command

As part of the internet setup process, the Internet Service Provider (ISP) also provides you with a public IP (Internet Protocol) address, which is assigned to the router (modem) to identify your network and connect online.

Although, usually, you don’t need to worry about this information, sometimes it’s important to know your current public IP address to troubleshoot connectivity problems, or access remote services, such as SFTP, VPN, or private website without a domain name.  

In this guide, you’ll learn the steps to find out the public IP address of your network using PowerShell on Windows 10.

How to get external IP address on Windows 10

To find out the public IP address using PowerShell, use these steps:

  1. Open Start.

  2. Search for PowerShell and click the top result to open the experience.

  3. Type the following command to find your public IP address and press Enter:

    (Invoke-WebRequest ifconfig.me/ip).Content.Trim()

    PowerShell public IP address command
    PowerShell public IP address command

Once you complete the steps, you’ll have an understanding of the external address that your ISP has assigned to your internet connection.