Manage Citrix Cloud and On Prem with a single PowerShell SDK

At Synergy recently, Paul and I gave a demo of the updated XenDesktop Farm Migration tool which now supports migrating VM’s from on prem to Citrix Cloud. Leading up to our session, we heard some conversations where people stated that you cannot install the XenApp and XenDesktop Remote PowerShell SDK and the regular PowerShell SDK’s on the same machine as it will break them. And yes, this is the case, there will be a conflict between them and you will get errors when you try to run commands.

But what I think a lot of people don’t realize is that you can actually manage both your on prem and your Citrix Cloud resources using just the single SDK, the XenApp and XenDesktop Remote PowerShell SDK, so you shouldn’t need to install both SDK’s.

The XenApp and XenDesktop Remote PowerShell SDK comes with the following snap-ins:

Active Directory (AD) Identity
Machine Creation
Configuration Logging
Delegated Administration
Proxy (This is the snap-in that manages the authentication cmdlets for Citrix Cloud)

So how can you use it to manage both? In the first example here, when I issue a command, it will default to trying to connect to Citrix Cloud. I get prompted for my Citrix Cloud credentials and the command completes.


Now if I try to do the same for an on prem controller and pass in the AdminAddress switch, it will still default to connect to Citrix Cloud. How to get it to talk to the on prem controller instead of Citrix Cloud? You preface your command with this cmdlet:

Set-XDCredentials –ProfileType OnPrem

This will tell the SDK that you want to use Kerberos authentication and communicate with on prem controllers and not Citrix Cloud.


So from the same machine, I am able to talk to both the Citrix Cloud control plane and on prem controllers using just the XenApp and XenDesktop Remote PowerShell SDK. There are a number of cmdlets that are disabled in Citrix Cloud to preserve the integrity and security of the Cloud control plane, you can find details of those here. The good thing however, is that these cmdlets will run just find against your on prem resources from the remote SDK.



So with that single SetXDCredentials cmdlet, I no longer need separate SDKs on separate machines, I can perform the vast majority of my management functions for both Citrix Cloud and my on prem resources from a single point. This was the key to getting Citrix Cloud functionality coded in to the XenDesktop Farm Migration tool, which will be posted here in the next week or so. Hopefully this tip will save you some administrative headaches…


One Comment

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">