Microsoft Developer Network >
Domovská stránka fór
>
Using the Exchange Server Protocols
>
How to call the 64bit powershell
How to call the 64bit powershell
- 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.Create();
PSSnapInInfo info = null;
//"Microsoft.Exchange.Management.PowerShell.E2010" is point to Exchange14
info = rc.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010", out warning);
////////////////////////////////////////////////////////////////////////////////////
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!
Odpovědi
- Hi Bingchao:
This forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx. Your post does not appear to be related to the Open Protocol Specification documentation. You may find more information related to your problem at the following links:
Regards, Obaid Farooqi- Označen jako odpověďObaid FarooqiMSFT, Moderátor23. června 2009 16:05
Všechny reakce
- Hi Bingchao:
This forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn2.microsoft.com/en-us/library/cc203350.aspx. Your post does not appear to be related to the Open Protocol Specification documentation. You may find more information related to your problem at the following links:
Regards, Obaid Farooqi- Označen jako odpověďObaid FarooqiMSFT, Moderátor23. června 2009 16:05

