Creating a unique STA ID for XenApp 6 with provisioning
# Change XenApp 6 STA ID to MAC Address # Created by Michel Stevelmans - http://www.michelstevelmans.com # Set location of CtxSta.config file $Location = "${env:ProgramFiles(x86)}\Citrix\system32\CtxSta.config" # Get the MAC address of the first NIC $Nics = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IpEnabled = TRUE" foreach ($Nic in $Nics) { $Mac = $Nic.MacAddress Break } # Remove colons from MAC Address $Sta = $Mac.Replace(":", "") # Replace STA ID with MAC Address (Get-Content $Location) | Foreach-Object {$_ -replace '^UID=.+$', "UID=STA$Sta"} | Set-Content $Location # Restart Citrix XML Service Restart-Service CtxHTTP
Source:
http://www.michelstevelmans.com/creating-unique-sta-id-xenapp-6-provisioning/