Microsoft.Exchange.Management.PowerShell.Admin

时光总嘲笑我的痴心妄想 提交于 2019-12-04 20:14:01

It also depends on how the code is compiled in VS 2010 (x86 or x64). If you want to load the 64 Bit Exchange Server Snapin you have to compile with x64.

You can use $PsVersionTable to check if the PowerShell is version 2.0 (it should)

I doubt that it is sufficient to just grab the one dll. And even if it is just the one DLL, will the snapin support remote operations? Eithe way, you still need to "install" the snapin so that PowerShell sees it e.g.:

PS> $snapinPath = 'Microsoft.Exchange.Management.PowerShell.Admin.dll'
PS> C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /i $snapinPath

If you want to do this remotely and you happen to be using PowerShell 2.0 then try out the remoting features. It would probably be better to run the snapin via a remote session to the Exchange server.

I believe the Exchange 2007 snapin is a 32-bit DLL. I'm not a professional programmer, but how about trying to create your program as a 32-bit app?

I'm thinking if you build your app as 32-bit, then it will use the 32-bit PowerShell engine, and be able to load the snapin properly.

Now, I'd not recommend trying to copy the DLL to other servers. You should be installing the Exchange admin tools on the server where you're developing your app.

Hope this helps... If not, post a comment below.

Seriously confused by this.

Exchange 2007 SP2 installed, says it has PowerShell v2.0 support, but this is NOT TRUE.

Still shows up as a PSVersion 1.0 and not 2.0 look below:

Name : microsoft.exchange.management.powershell.admin PSVersion : 1.0 Description : Admin Tasks for the Exchange Server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!