deploying Citrix Desktop PowerShell commands
Howdy!
I have written a few PowerShell scripts that do stuff to Citrix like check which Citrix Server a user is connected to, kill connections etc.
I am having a heck of a time figuring out where all the Citrix commands that I have on my machine came from. I think I installed the XenApp SDK at some point but I am unable to figure out where they came from.
In my control panel (win11) I have a bunch of Citrix Apps all installed on the same day a few months ago (eg Citrix Analytics PowerShell snap-in version 7.21.0.115
most of the apps are version 7.21.xx.xx
all the googles say install the SDK then run import-Snapin Citrix* but that's not working on my test machine. all the Citrix commands error as unknown commandlet.
if I have commands on my PowerShell can I distribute them to other users? it's just a group of 6 people so it can be a totally manual process but I can't get an SDK to install and populate commands.
Posted Nov 28, 2023, 8:32 PM UTC
You can run
Get-Command "commandname"and it will tell you what snapin/module it came from.For Citrix, you can find all of the powershell snapins on the installation iso under Driveletter:\x64\Citrix Delivery Controller\
Alternatively you can just install Citrix Studio on the machine and It should install all of the required powershell snapins for you.
OK great, thanks.
The module is a citrix.command.something it doesn;t unfoirtuynately remind me where I got it from.
I will look on the DC as well.
I'm also looking to see if New-session -Computer <CitrixDirectorServer> | Export-Module CitrixModule (or whatever, I'm not sure that's pipeable but you get the gist) would pull down the commands.