Citrix PVS Powershell – MCLIPSSnapin installation

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Citrix PVS is a great system but PVS Console is sometimes not enough to do some tasks. That’s why Citrix published PowerShell SnapIn for PVS. It’s not perfect but it help us to automate our work. So let’s begin with installation.

Documentation: Provisioning Services 7.1 PowerShell Administrator’s Guide

To do it you have to install Citrix PVS Console on a server where you want to use PoSH snapin. My PVS infrastructure was installed on Windows 2012R2. In manual we can find how to install it using .NET Framework 2.x. I wanted to do this using Framework 4.x.

PVS_PoSH_01

As you can see I got many errors. Here is the command I used to install this module:

PS C:\Program Files\Citrix\Provisioning Services Console> C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe McliPSSnapIn.dll

And how it looks in PoSH console windows:

PVS_PoSH_02

In the next step you have to import SnapIn to PowerShell:

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

PS C:\Program Files\Citrix\Provisioning Services Console> Add-PSSnapin -Name McliPSSnapIn

Now we are ready to make a connection to PVS Server (without parameters if you are executing it on PVS Server):

PS C:\Program Files\Citrix\Provisioning Services Console> Mcli-Run SetupConnection
Run succeeded.

Where are addition parameters for SetupConnection command:

Mcli-Run SetupConnection -p name=value[, name2=value2]
Setup the SOAP server connection that will be used for the MCLI and
PowerShell command line interfaces.

-p
Parameters needed for this Run.
Optional
server Server used for the connection.
Default=localhost
port Port used for the connection.
Default=8000
user User used for the connection.
Default=Current user
domain User domain used for the connection.
Default=Current user
password User password used for the connection.
Default=Current user

So let’s try if we can show help for specified command:

PS C:\Program Files\Citrix\Provisioning Services Console> Mcli-Help Get Device

PVS_PoSH_03

Right now we are ready to use PowerShell to script tasks in PVS. I will show how to do this in next post.

Post author

There are 1 Comment

  1. Posted by FMarte Reply

    If you happen to be using PowerShell 2.0 and a more recent version of PVS, like 7.6.2 (versus 7.6.0 which works as above) then you should note that PoSH 2.0 defaults to the 2.x framework. You have to take extra steps to get it to leverage the 4.x framework. See http://viziblr.com/news/2012/5/16/the-easy-way-to-run-powershell-20-using-net-framework-40.html

    Thanks for the above post BTW.

Leave a Reply