How to call the 64bit powershellHi,All:<br/><br/>i am trying to call the powershell to do something on Exchange12 and Exchange14, and the environment as belows:<br/><br/>the OS is 64bit.<br/>32bit and 64bit powershell are both installed.<br/>Exchange14 is installed.<br/><br/>And i try to call 64bit powershell to do something on Exchange14, and the codes like:<br/><br/>but everytime the codes will call 32bit powershell and throw one exception with the error message:<br/>Add-PSSnapin : No Windows PowerShell Snap-ins are available for version 2<br/>////////////////////////////////////////////////////////////////////////////////////<br/>using<span style="font-size:x-small"><span style="font-size:xx-small"> System.Management.Automation<br/><br/><span style="font-size:x-small"><span style="color:#2b91af">RunspaceConfiguration </span>rc = </span><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">RunspaceConfiguration</span></span></span><span style="font-size:x-small"><span style="font-size:xx-small">.Create();<br/><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">PSSnapInInfo</span></span><span style="font-size:x-small"> info = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">null</span></span></span><span style="font-size:xx-small"><span style="font-size:x-small">;<br/><br/>//&quot;<span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">Microsoft.Exchange.Management.PowerShell.E2010</span></span>&quot; is point to Exchange14<br/>info = rc.AddPSSnapIn(&quot;<span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">Microsoft.Exchange.Management.PowerShell.E2010</span></span>&quot;, </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">out</span></span></span><span style="font-size:x-small"><span style="font-size:xx-small"> warning);<br/></span><span style="color:#0000ff"><span style="font-size:xx-small">////////////////////////////////////////////////////////////////////////////////////<br/></span></span></span></span></span><br/>By the way, i manually start 64bit powershell, and execute the cmdlet: <br/>&quot;Add-PsSnapin microsoft.Exchange.Management.Powershell.E2010&quot; sucessfully, and have the same error using the 32bit powershell. <br/><br/>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!<br/>© 2009 Microsoft Corporation. All rights reserved.Tue, 23 Jun 2009 16:05:22 Zc4d31fac-cd34-40e6-80a0-f3c42038bd06http://social.msdn.microsoft.com/Forums/en-US/os_exchangeprotocols/thread/c4d31fac-cd34-40e6-80a0-f3c42038bd06#c4d31fac-cd34-40e6-80a0-f3c42038bd06http://social.msdn.microsoft.com/Forums/en-US/os_exchangeprotocols/thread/c4d31fac-cd34-40e6-80a0-f3c42038bd06#c4d31fac-cd34-40e6-80a0-f3c42038bd06bingchaohttp://social.msdn.microsoft.com/Profile/en-US/?user=bingchaoHow to call the 64bit powershellHi,All:<br/><br/>i am trying to call the powershell to do something on Exchange12 and Exchange14, and the environment as belows:<br/><br/>the OS is 64bit.<br/>32bit and 64bit powershell are both installed.<br/>Exchange14 is installed.<br/><br/>And i try to call 64bit powershell to do something on Exchange14, and the codes like:<br/><br/>but everytime the codes will call 32bit powershell and throw one exception with the error message:<br/>Add-PSSnapin : No Windows PowerShell Snap-ins are available for version 2<br/>////////////////////////////////////////////////////////////////////////////////////<br/>using<span style="font-size:x-small"><span style="font-size:xx-small"> System.Management.Automation<br/><br/><span style="font-size:x-small"><span style="color:#2b91af">RunspaceConfiguration </span>rc = </span><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">RunspaceConfiguration</span></span></span><span style="font-size:x-small"><span style="font-size:xx-small">.Create();<br/><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">PSSnapInInfo</span></span><span style="font-size:x-small"> info = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">null</span></span></span><span style="font-size:xx-small"><span style="font-size:x-small">;<br/><br/>//&quot;<span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">Microsoft.Exchange.Management.PowerShell.E2010</span></span>&quot; is point to Exchange14<br/>info = rc.AddPSSnapIn(&quot;<span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">Microsoft.Exchange.Management.PowerShell.E2010</span></span>&quot;, </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">out</span></span></span><span style="font-size:x-small"><span style="font-size:xx-small"> warning);<br/></span><span style="color:#0000ff"><span style="font-size:xx-small">////////////////////////////////////////////////////////////////////////////////////<br/></span></span></span></span></span><br/>By the way, i manually start 64bit powershell, and execute the cmdlet: <br/>&quot;Add-PsSnapin microsoft.Exchange.Management.Powershell.E2010&quot; sucessfully, and have the same error using the 32bit powershell. <br/><br/>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!<br/>Tue, 23 Jun 2009 03:40:41 Z2009-06-23T03:40:41Zhttp://social.msdn.microsoft.com/Forums/en-US/os_exchangeprotocols/thread/c4d31fac-cd34-40e6-80a0-f3c42038bd06#18ca7b13-3175-4208-8207-13b36499ecb3http://social.msdn.microsoft.com/Forums/en-US/os_exchangeprotocols/thread/c4d31fac-cd34-40e6-80a0-f3c42038bd06#18ca7b13-3175-4208-8207-13b36499ecb3Obaid Farooqihttp://social.msdn.microsoft.com/Profile/en-US/?user=Obaid%20FarooqiHow to call the 64bit powershellHi Bingchao:<br/><br/>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: <a class=externalLink rel=nofollow href="http://msdn2.microsoft.com/en-us/library/cc203350.aspx.">http://msdn2.microsoft.com/en-us/library/cc203350.aspx.</a> 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:<br/><br/>  <p style="margin:0in;font-family:Calibri;font-size:11pt"><a href="http://blogs.msdn.com/mstehle/archive/2007/01/25/kb-preview-error-no-windows-powershell-snap-ins-when-loading-exchange-powershell-snap-in.aspx">http://blogs.msdn.com/mstehle/archive/2007/01/25/kb-preview-error-no-windows-powershell-snap-ins-when-loading-exchange-powershell-snap-in.aspx</a></p> <br/><br/>  <p style="margin:0in;font-family:Calibri;font-size:11pt"><a href="http://blogs.msdn.com/dolange/archive/2008/02/21/powershell-community-extensions-on-server-2008-x64.aspx">http://blogs.msdn.com/dolange/archive/2008/02/21/powershell-community-extensions-on-server-2008-x64.aspx</a></p> <br/><br/> <hr class="sig">Regards, Obaid FarooqiTue, 23 Jun 2009 16:05:10 Z2009-06-23T16:05:10Z