Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Runspaces.PSSnapInException: Cannot load Windows PowerShell snap-in ...PowerShell.E2010?

$
0
0
Hi,


I have a C# program which works for Exchange 2010. It does:

1) Create RunspaceConfiguration;
2) Add SnapIn E2010;
3) Create run space, pipeline....

It works fine on Exchange 2010 + Windows 2008 without any problems.

Now, I put it on Exchange 2013 + Windows 2012, for some reasons, it fails at adding snap in (step 2), the exception is:

System.Management.Automation.Runspaces.PSSnapInException: Cannot load Windows PowerShell snap-in Microsoft.Exchange.Management.PowerShell.E2010 because of the following error: Could not load file or assembly 'file:///C:\Program Files\Microsoft\Exchange Server\V15\bin\Microsoft.Exchange.PowerShell.Configuration.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
   at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadMshSnapinAssembly(PSSnapInInfo mshsnapinInfo)
   at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadCustomPSSnapIn(PSSnapInInfo mshsnapinInfo)
   at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadPSSnapIn(PSSnapInInfo mshsnapinInfo)
   at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadPSSnapIn(PSSnapInInfo mshsnapinInfo, PSSnapInException& warning)
   at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.DoAddPSSnapIn(String name, PSSnapInException& warning)
   at ................
   
Anyone knows a solution? Could it be because of Windows 2012?

Thanks

Viewing all articles
Browse latest Browse all 4521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>