You might get following error when you load a snap-in that is written by DotNet 4.0.
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
This is because by default, PowerShell uses DotNet version 2.0 CLR. To use powershell load DotNet 4.0 assemblies, the following settings need to be added in PowerShell.exe.config under C:WindowsSysWOW64WindowsPowerShellv1.0.
- Above applies to 64bit windows server 2008 r2. On a 32 bit machine, PowerShell.exe.config can be found at C:windowsSystem32WindowsPowerShellv1.0
- Create PowerShell.exe.config if this file is not found.