> ## Content Index
> Fetch the complete content index at: https://www.filipkonopik.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# PowerShell: Get Public IP Address
- URL: https://www.filipkonopik.com/powershell-get-public-ip-address/
- Published: 2026-07-26T08:32:51.000Z
- Updated: 2026-08-06T05:33:53.000Z
- Author: Filip Konopík
- Tags: Connectivity

Need to check a machine's public (external) IP address - for remote access setup, whitelisting, or confirming what address you're browsing from? This one-liner fetches it from an external service.

Prerequisites:

- Privileges: None
- Module: Built-in, no import needed

Quick Command:

```PowerShell
Invoke-RestMethod -Uri "https://api.ipify.org"
```

Example Output:

```powershell
203.0.113.42
```

📦

****Want all of them at once?**  
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

[Get the Complete Bundle for $39](https://gum.co/u/oczvkqdc?ref=filipkonopik.com)

How It Works:

- Invoke-RestMethod sends a web request and returns the response - unlike local system queries (CIM/WMI), your public IP isn't stored anywhere on the machine itself, since it's assigned by your ISP at the network level, not by your computer.
- \-Uri "https://api.ipify.org" points to a free, simple API that returns nothing but your current public IP address as plain text.
- Since the service returns just the raw IP with no extra formatting, no Select-Object or parsing is needed - the output is already exactly what you want.

Pro Tip:

This requires an active internet connection to work, unlike the local IP address lookup - if there's no internet access, this command will fail or time out.