• Error in the Provisioning Services 7.0 PowerShell Programmer Guide for Windows 8 and Server 2012

    June 29, 2013

    PowerShell, PVS

    In working on updating the PVS documentation script to add support for PVS7, I ran into an issue with getting the McliPSSnapin.dll registered.  This brief article explains how to resolve this issue.

    The Provisioning Services 7.0 PowerShell Programmer Guide is available here.

    On page 7, the instructions given to install the PowerShell Snap-in are not correct for Windows 8 or Server 2012.

    The original instructions work for Server 2003, Server 2008, Server 2008 R2, Windows XP and Windows 7.

    <quote>

    Installation of PowerShell Snap-In

    The PowerShell snap-in (McliPSSnapIn.dll) can be installed using the Provisioning Server Console install.

    If it later needs to be registered in PowerShell, this can be manually done by running one of the following commands at the DOS command prompt:

    For 32-bit

    %systemroot%\Microsoft.NET\Framework\v2.0.50727\installutil.exe McliPSSnapIn.dll

    For 64-bit

    %systemroot%\Microsoft.NET\Framework64\v2.0.50727\installutil.exe McliPSSnapIn.dll

    </quote>

    The correct instructions for Windows 8 and Server 2012 are:

    For 32-bit

    %systemroot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe McliPSSnapIn.dll

    For 64-bit

    %systemroot%\Microsoft.NET\Framework64\v4.0.30319\installutil.exe McliPSSnapIn.dll

    If you attempt to run the original command, you get:

    Error adding Snap-In
    Error adding Snap-In

    That is because there is nothing in the v2.0.50727 folder.

    Nothing in the v2.0.50727 folder
    Nothing in the v2.0.50727 folder

    The InstallUtil.exe utility is in the v4.0.30319 folder.

    InstallUtil.exe
    InstallUtil.exe

    I am testing with 32-bit Windows 8, so I needed to run:

    %systemroot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe McliPSSnapIn.dll

    Installing MCLIPSSnapin.dll
    Installing MCLIPSSnapin.dll

    Now I can configure a remote connection to my PVS7 server and run a MCLI PowerShell command.

    Successfully running a remote PowerShell command
    Successfully running a remote PowerShell command

    I hope Citrix will correct the PVS7 PowerShell Programmer Guide.

    Thanks

    Webster

    , , ,

    About Carl Webster

    Webster is a Sr. Solutions Architect for Choice Solutions, LLC and specializes in Citrix, Active Directory and Technical Documentation. Webster has been working with Citrix products for many years starting with Multi-User OS/2 in 1990.

    View all posts by Carl Webster

    No comments yet.

    Leave a Reply