Question

I am running PowerShell 2 on a Windows Server 2008 R2 Standard Server (German).

I want to use the SharePoint 2010 Management Console but am getting the following Errors:

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.

and

Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime.

when calling get-spfarm.

I get the following when I try to identify the Version:

PowerShell Version

It uses the CLR Version 4.0.30319.1:

This seems to not be supported by SharePoint.

I than tried to run PowerShell as follows:

PowerShell.exe -Version 2.0

But somehow PoweShell still uses the CLR version 4.0.30319.1:

PowerShell Version

A lot of people on the internet have stated that they had this problem when the windows update KB2506143 was installed. This is not installed on my machine.

How can I force PowerShell to use the 2.0 Version of the .NET CRL?

Was it helpful?

Solution 4

We have now found a solution to the problem: We uninstalled the .NET Framework 4 (since we did not need this on the SharePoint Server). After this we could use the PowerShell for SharePoint again.

OTHER TIPS

Seems like the file on Server 2008 is Powershell.exe.activation_config. It's located at C:\Program Files(x86)\Common Files\NetApp.

Hope this helps!

Check out your powershell.exe.config file. Do you see the /configuration/startup/requiredRuntime XML element?

http://msdn.microsoft.com/en-us/library/a5dzwzc9(v=vs.110).aspx

Either undo any changes you made to your system that forced PowerShell or other .Net applications to use CLR 4. See here.

Or install .Net 3.5 (or 3.0 or 2.0), which will install CLR 2. If you run Windows 8 or 2012 you need do that by changing the Windows features. See here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top