Install the XenServer PowerShell Snapin on a 64-bits Windows OS

As I’m discovering the CLI options I can revert to for scripting automated jobs for the XenServer 5.5 environment, I wanted to check out the new PowerShell Snapin provided by Citrix. After downloading and installing the XS-PS Windows installer I discovered that the PowerShell cmdlets were only installed for the PowerShell (X86) console and were not installed for the 64-bits console.

Fortunately for me a solution is mentioned on the XenServer SDK download page

In order to use the cmdlets in the 64-bits PowerShell Console, all you need to do is run the following command after the msi install in a command box:

C:\Windows\Microsoft.NET\Framework64\v2.0.50727>InstallUtil.exe "c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPSSnapIn.dll"

 

Giving the following result:

Microsoft (R) .NET Framework Installation utility Version 2.0.50727.3053
Copyright (c) Microsoft Corporation.  All rights reserved.

Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPSSnapIn.dll assembly's progress.
The file is located at c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServer
PSSnapIn.InstallLog.
Installing assembly 'c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPS
SnapIn.dll'.
Affected parameters are:
   assemblypath = c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPSSnapIn.dll
   logfile = c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPSSnapIn.InstallLog
   logtoconsole =

The Install phase completed successfully, and the Commit phase is beginning.
See the contents of the log file for the c:\Program Files (x86)\Citrix\XenServer
PSSnapIn\XenServerPSSnapIn.dll assembly's progress.
The file is located at c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServer
PSSnapIn.InstallLog.
Committing assembly 'c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPS
SnapIn.dll'.
Affected parameters are:
   assemblypath = c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPSSnapIn.dll
   logfile = c:\Program Files (x86)\Citrix\XenServerPSSnapIn\XenServerPSSnapIn.InstallLog
   logtoconsole =

The Commit phase completed successfully.

The transacted install has completed.

C:\Windows\Microsoft.NET\Framework64\v2.0.50727>

 

After the command is run, the XenServer PowerShell Snapin is available in the PowerShell console, which can be checked with the Get-PSSnapin command:

PS C:\Users\admin> Get-PSSnapin -registered

Name        : XenServerPSSnapIn
PSVersion   : 2.0
Description : Citrix XenServer PowerShell SnapIn

 

And you’re all set up to discover the many PowerShell cmdlets the snapin has to offer.

 

The following sources have been used to create this post:
Download SDKs – XenServer – Citrix Community

Esther Barthel
Senior Consultant at PepperByte

Esther has been working in different roles and functions as an IT consultant ever since she finished her Masters degree in Computer Science in 1997. She has worked as a web developer, database administrator, and server administrator until she discovered how Server-Based Computing ( SBC ) combined servers, desktops, and user experience in one solution. Esther has been specializing in virtualization solutions such as SBC, VDI, application, and server virtualization for over eight years now and is currently working as a Senior Consultant at PepperByte, where she designs and implements Citrix® solutions for both small-business and large-enterprise infrastructures scaling from 100 to 15,000 users.
In january 2014 her first book Citrix XenApp 6.5 Expert Cookbook was published by Packt Publishing.

Esther is awarded as a Citrix Technology Professional (CTP) from 2015 - 2017.
Esther is awarded as a Microsoft Most Valuable Professional (MVP) in 2017.

Esther is a Citrix Certified Expert – Virtualization (CCE-V), Citrix Certified Professional – Mobility (CCP-M), Citrix Certified Professional – Networking (CCP-N) and RES Software Certified Professional (RCP).

3 thoughts on “Install the XenServer PowerShell Snapin on a 64-bits Windows OS

  1. Pingback: Frank M. Merino

  2. Pingback: Bart Groot Zevert

  3. Pingback: Kees Baggerman