Fixing Internal and External Domain Name Mismatch in RDWeb Server 2012
When using Remote Desktop Web Access on Windows Server 2012 or 2012 R2, you might encounter a domain name mismatch issue in the generated .RDP files. This typically happens when the internal FQDN does not match the public domain defined in the installed SSL certificate.
This is common in environments using internal domains like .local, .private, or .internal, while the SSL certificate is valid only for a public domain (e.g., *.yourdomain.com).
Solution: Force the Published FQDN via PowerShell
You can explicitly define the public FQDN that should appear in the RDP files using the following PowerShell cmdlet:
Set-RDPublishedName -ClientAccessName "PUBLIC_FQDN"
Example
Set-RDPublishedName "remote.contoso.com"
This command sets the public FQDN to remote.contoso.com, which should match your wildcard SSL certificate (*.contoso.com).
Note
Run the command on the server holding the Remote Desktop Connection Broker role.
If the command fails, ensure script execution is enabled with the following:
Set-ExecutionPolicy Unrestricted