Recently during a DR Test we wanted to change the Address on the RDP file that was being downloaded from the Remote Desktop Gateway.
Someone had put together a nicescript that can do it here :
This changed the internal server
However the file still has the old address for RD Gateway server ( in this line : gatewayhostname:s: )
You can change this using powershell per below
Set-RDSessionCollectionConfiguration -CollectionName “Finance Staff RDP” -CustomRdpProperty “gatewayhostname:s:office.domain.com:444“
Changes this your External Server