Restoring Citrix XenApp Cloud Worker from AMI
In order to properly restore a QA worker that is a Terminal Services server, like KMCXCWQA1USW2A, we need to add a key to the registry. That is because the server is looking to an iHeart server for Remote desktop licensing. The server is on the domain at this point. When you disjoin the server from the domain to rename it, it will then be looking to the workgroup part of the registry for the license server. The key is not currently there, so the server will not allow you to RDP back into the server after the reboot. You will get an error referring to not having an RDP license. To fix this problem, we will add a new registry key.
Current key:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
The licensing mode should be set to 4, not 5.

Add new key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService\Parameters
Key: LicenseServers
String value name: SpecifiedLicenseServers
String value data: ccimds22sat.usa.ccu.clearchannel.com

Add a firewall rule to allow port 3389 (RDP) for all profiles (domain, private, & public).