How to call the 64bit powershell RRS feed

  • Question

  • Hi,All:

    i am trying to call the powershell to do something on Exchange12 and Exchange14, and the environment as belows:

    the OS is 64bit.
    32bit and 64bit powershell are both installed.
    Exchange14 is installed.

    And i try to call 64bit powershell to do something on Exchange14, and the codes like:

    but everytime the codes will call 32bit powershell and throw one exception with the error message:
    Add-PSSnapin : No Windows PowerShell Snap-ins are available for version 2
    using System.Management.Automation

    RunspaceConfiguration rc = RunspaceConfiguration
    PSSnapInInfo info = null

    //"Microsoft.Exchange.Management.PowerShell.E2010" is point to Exchange14
    info = rc.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010",

    By the way, i manually start 64bit powershell, and execute the cmdlet:
    "Add-PsSnapin microsoft.Exchange.Management.Powershell.E2010" sucessfully, and have the same error using the 32bit powershell.

    So could you please tell me how can i call the 64bit powershell and with the 32bit and 64bit are both installed.Thank you very much!
    • Moved by nobugz Wednesday, June 24, 2009 3:10 AM (From:Visual C# Express Edition)
    Tuesday, June 23, 2009 3:38 AM


All replies