Set the variables in the first section of each script.
HOSTNAME is the FQDN of the record you're updating.
PASSWORD is the key associated with that record.
DEVICE is the name of the device to get the IP address from in the bash script. The PowerShell script uses an external service.
Run the script using cron/task scheduler.