Using dyndns' checkip page and two lines of PowerShell, you can get your public IP address easily -
$wc.downloadstring("http://checkip.dyndns.com") -replace "[^\d\.]"
Note the use of -replace with a single argument. This removes the pattern and works like -replace "string","". I also really like that you can call a method and work directly on the output.
You could turn this into a one-liner -
(New-Object net.webclient).downloadstring("http://checkip.dyndns.com") -replace "[^\d\.]"
but I think the two-line version is much easier to read, so I'll stick to that.
PS. Regex interpreration: Remove everything not (^) a digit (\d) or a dot (\.). The webpage returns a string like "Current IP Address: 10.1.2.3" and I wanted to get rid of the extra stuff.