I ran into a little snag when executing some XenApp PowerShell commands. Certain commands like Get-XAFarm and Get-XAAdministrator would always give an “0x80060016” error. Here is an example and the fix:
PS C:\Windows\system32> Get-XAFarm<br />
Get-XAFarm : Error reading the current administrator data (0x80060016)<br />
At line:1 char:11<br />
+ Get-XAFarm <<<<<br />
+ CategoryInfo : InvalidResult: (:) [Get-XAFarm], CitrixException<br />
+ FullyQualifiedErrorId : GetCitrixAdminType,Citrix.XenApp.Commands.GetFarmCmdlet
Typically this error code in Citrix indicates a problem with IMA. But in this case it was even simpler than that: IMA couldn’t resolve the hostname of the database server hosting the data store. Make sure that the correct DNS suffixes are being applied so IMA can find the server, and if that fails, just add it to the hosts file and try again.