Mark's profileMark Sheppard's SpaceBlogLists Tools Help

Blog


    January 02

    PowerShell Community Extensions and x64

    PowerShell Community Extensions is a great addition to PowerShell that supplements the out-of-the box set of cmdlets. However, it doesn't work out-of-the-msi on an x64 platform.

    When installing, I opted to use the Shared Profile, but got the following when I tried to run PowerShell:

    Windows PowerShell
    Copyright (C) 2006 Microsoft Corporation. All rights reserved.

    Add-PSSnapin : Windows PowerShell snap-in Pscx is not installed on the machine.
    At C:\Documents and Settings\Mark\MyDocs\WindowsPowerShell\profile.ps1:38 char:13
    + Add-PSSnapin <<<< Pscx

    Transcript started, output file is C:\Documents and Settings\Mark\MyDocs\WindowsPowerShell\Transcripts\20070102.1
    43613.7364.txt
    [C:\Documents and Settings\Mark]
    1> Get-PSSnapin

    Name : Microsoft.PowerShell.Core
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains Windows PowerShell management cmdlets used to manage components
    of Windows PowerShell.

    Name : Microsoft.PowerShell.Host
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains cmdlets used by the Windows PowerShell host.

    Name : Microsoft.PowerShell.Management
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains management cmdlets used to manage Windows components.

    Name : Microsoft.PowerShell.Security
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains cmdlets to manage Windows PowerShell security.

    Name : Microsoft.PowerShell.Utility
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains utility Cmdlets used to manipulate data.

    [C:\Documents and Settings\Mark]
    2> Get-PSSnapin -Registered

    Name : PowerGadgets
    PSVersion : 1.0
    Description : Generates Charts, Gauges and Maps Gadgets from Windows PowerShell data

    Well the snap-in isn't registered on my system, let's try PowerShell (32bit):

    Windows PowerShell
    Copyright (C) 2006 Microsoft Corporation. All rights reserved.

    Transcript started, output file is C:\Documents and Settings\Mark\MyDocs\WindowsPowerShell\Transcripts\20070102.1
    44524.1412.txt
    [C:\Documents and Settings\Mark]
    1> Get-PSSnapin pscx

    Name : Pscx
    PSVersion : 1.0
    Description : PowerShell Community Extensions (PSCX) base snapin which implements a general purpose set of cmdlets.

    Works with no troubles.

    Fortunately this is easy to fix, the installer used for Pscx is a 32bit process and doesn't invoke the 64bit version of InstallUtil.exe to register the snap-in for 64bit processes. Just run the following from your favourite shell:

    [C:\Documents and Settings\Mark]
    1> C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe "C:\Program Files (x86)\PowerShell Community Extensions\InstallerCustomAction.dll"

    [C:\Documents and Settings\Mark]
    2> C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe "C:\Program Files (x86)\PowerShell Community Extensions\pscx.dll"

    Restart PowerShell and everything is good for both 32bit and 64bit PowerShell :)

    I have raised this as an issue on site. Hopefully they'll fix it on the next release.

    Comments (1)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    No namewrote:
    This is all good but when I run InstallUtil.exe on Windows Server 2003 R2 x64 I get:

    C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe cannot start or run due to incompatibility with 64-bit versions of Windows!

    Damn...!
    Jan. 15

    Trackbacks

    The trackback URL for this entry is:
    http://mark-sheppard.spaces.live.com/blog/cns!1905A40C83BF050F!151.trak
    Weblogs that reference this entry
    • None