Dersom du har en Windows-maskin så kan du oppdatere IP-adressen din via PoweShell versjon 3 om du vil.
#Your info goes here
$hostname = "mindomen.no"
$pwd = "brukernavn
$user = "passord"
#Get a page with your current IP
$MyIpPage = Invoke-WebRequest "https://dns.loopia.se/checkip/checkip.php"
#Make sure we got a IP back in the response
If ($MyIpPage.RawContent -match "(?:[0-9]{1,3}.){3}[0-9]{1,3}")
{
$myIp = $Matches[0]
#Create a set of credentials
$secpasswd = ConvertTo-SecureString $pwd -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($user, $secpasswd)
#Build up the URL
$url = "https://dns.loopia.se/XDynDNSServer/XDynDNS.php?hostname=$hostname&myip=$myIp"
#Invoke the URL
$resp = Invoke-WebRequest -Uri $url -Credential $mycreds
$resp.Content #Expected answers that I found "good","nochg","nohost","badauth","notfqdn"
}
Else
{
#fake response if we didn't get any IP
"NoDynIP"
}
Bytt mindomen.no til det domenenavnet du vil stille inn IP-adressen for, brukernavn til ditt brukernavn på kontoen din i kundesonen og passord til ditt passord til kundesonen.
Takk til Pär på Powershell.today for scriptet!
