I have a home ISP and get every once a week or so a new external WAN IP.

It’s no problem but it makes RDPing a little difficult.

Options are DynDNS or NoIP, I however wanted something Powershell based.

I set it up as a scheduled task and run it once an hour. It will see if there is a new IP, if there is it’ll write it to a Dropbox file that I can access from my phone, so I’ll always know the current WAN IP.

function get-exip {
$url = "http://checkip.dyndns.com"

$webclient = New-Object System.Net.WebClient

$IP = $webclient.DownloadString($url)

$Ip2 = $Ip.ToString()
$ip3 = $Ip2.Split(" ")
$ip4 = $ip3[5]
$ip5 = $ip4.replace("</body>", "")
$FinalIPAddress = $ip5.replace("</html>", "")
$IPnew = Get-Content -Path "C:\users\$ENV:USERNAME\Dropbox\Scripts\TEST\index.html"

if (!($FinalIPAddress -eq $IPnew)){