In case you do not want to install any additional software (e.g Perl, PHP, etc.), but you still would like to use our Dynamic DNS feature, you can benefit from this script. It is using standard built-in Windows libraries with easy setup and no additional software. It creates a Scheduled Task, which executes updateIP.vbs every hour.
In order to use this script, please follow the steps below:
1. Download the zip archive from the Dynamic URL pop-up of your record, once you activate Dynamic URL. On the bottom, you will see a Windows script (PowerShell) link.
2. Once you download the archive, create a folder in your C: drive and extract the files in it.
3. Navigate to the folder, where the files were extracted.
4. Run PowerShell as an Administrator.
5. In order to run PowerShell scripts you need to first enter this command
set-executionpolicy unrestricted
This will allow the script to run.
6. There are two extracted files - updateIP.ps1 and scheduleTask.ps1. You need to run scheduleTask.ps1 with PowerShell. In order to do that you can use this command when you are in the scripts directory:
.\scheduleTask.ps1
7. That's it! Your Dynamic DNS configuration for Windows is now ready.
Note: In order to avoid any issues, please do not change the files location.
And that’s all. Easy, isn't it? Now a Task should be scheduled to automatically update your IP in your DNS zone.
Lets imagine your public IP has just been changed. When you run the script, it will “open” the relevant Dynamic URL for your record, and the A record will be updated with your new IP address.
As for the cronjob, it just executes your script repetitively and regularly. That's the whole magic.