-
Adding the Local Administrator Account as a Full XenApp Farm Administrator Using Microsoft PowerShell
January 26, 2014
Blog, PowerShell, XenApp, XenApp 5 for Server 2003, XenApp 5 for Server 2008, XenApp 6.0, XenApp 6.5
Scenario: You are locked out of the Delivery Services Console or AppCenter or AppCentre and you need in. How? There is a tool called SlimJim you can use or you can use one line of PowerShell. Obviously, I would prefer PowerShell over an unsupported utility even if the utility works.
Here is a screenshot of my XenApp 6.5 AppCenter showing there is no local administrator account.
Note: My domain is Webster.
AppCenter with no Local Administrator The first thing I do is open a PowerShell session. Next I type in add-pssnapin *citrix* to load the Citrix XenApp PowerShell cmdlets. Next I type in hostname to verify the name of the local XenApp server. Then I type
new-xaadministrator LocalServerName\administrator -Enabled $True -AdministratorType Full
to add the XenApp server’s local administrator account as a Full Farm Administrator. Since the local administrator account has the same name on every server this effectively adds the local administrator from every XenApp server as a Full Farm Administrator.
PowerShell Session Finally I verify in AppCenter the account was added.
AppCenter with Local Administrator as a Full Farm Administrator To verify the local administrator account had access to AppCenter, I logged in as the local administrator and ran AppCenter.
Logged in as Local Administrator Running AppCenter as Local Administrator Granted, you will not have access to AppCenter of the Delivery Service Console but this is just to show you this one line of PowerShell works to add the local administrator account into your XenApp Farm as a Full Farm Administrator.
I only tested this on XenApp 6.5 but the same PowerShell command should work on XenApp 6, XenApp 5 for Server 2003 and XenApp 5 for Server 2008.Update 30-Jan-2014: I have now tested this on XenApp 5 for Server 2003, XenApp 5 for Server 2008, XenApp 6.0 and XenApp 6.5.
Thanks
Webster
6 Responses to “Adding the Local Administrator Account as a Full XenApp Farm Administrator Using Microsoft PowerShell”
Leave a Reply to Ganesh
October 10, 2016 at 11:23 am
Hello,
The admin in the organization left and before adding a new admin, the admin account has been removed. Is there any way to add a new admin through a backdoor? We have full windows privilege but wanted to add ourself to xenapp admin.
Thanks.
Venkat
October 14, 2016 at 8:38 am
Look at the second comment left about Slimjim for XenApp.
Also look at http://citrixtechs.com/blog/citrix-xenapp-6-locked-out-of-the-citrix-discovery-services-console/
Webster
August 4, 2015 at 3:42 pm
This does not appear to work unless the account executing the command is already a citrix administrator. What do you do if the only account that has administrative privledges is a domain account that has been deleted?
August 4, 2015 at 3:48 pm
Then you have to follow the instructions from super, duper, uber, genius Denis Gundarev.
http://www.slideshare.net/fdwl/how-to-hack-citrix-so-you-just-inherited-someone-elses-citrix-environment-how-do-you-figure-out-whats-what
Look for Slimjim for XenApp.
Webster
August 4, 2015 at 4:30 pm
The version of Slimjim that says it’s for Xenapp 6.5 doesn’t work either. The debugging tools install to a different directory than is in the batch file, and again you can’t run the command unless you’re already a Citrix administrator.
February 20, 2014 at 11:04 pm
This is cool. Thanks a lot for sharing!