Run Citrix PowerShell commands remotely
Website Visitors:Let’s say you have a script written in PowerShell for your Citrix environment and want to deploy it through Jenkins. How’d you do that? If you directly run a PowerShell script from a Jenkins machine (not Citrix DDC), you will end up in “The caller was not authenticated by the service” error.
Through Jenkins, you have to specify credentials. In VMWare PowerCli, we have -credential parameter using which we can specify explicit credentials. But with Citrix PowerShell snapins, we do not have that option. So, What is the solution?
The answer is by creating a PSsession to your Citrix server and importing Citrix PowerShell snapin in that PSsession. One other benefit of using this way is, you don’t have to install any Citrix PowerShell snapins in the machine you’re running this script from.
|
|
In your script, you can now run the Citrix PowerShell commands by adding the prefix. For example, Get-BrokerSession
cmdlet now becomes Get-CtxBrokerSession
.
Note:
- You have to be part of the local administrators group on the Citrix server to create pssession.
- If you are integrating the script with Jenkins, you can use invoke-command and then run the above script in the invoke-command script block.
Want to learn more on Citrix Automations and solutions???
Subscribe to get our latest content by email.