SharePoint 2010 and PowerShell 3.0
Published Feb 08 2019 12:50 PM 998 Views
Microsoft

First published on MSDN on Jan 07, 2013

SharePoint 2010 does not support PowerShell 3.0 at this time. If you or your admin team install PS 3.0 on your SharePoint 2010 farm, you will have some compatibility issues with the SharePoint 2010 Management Shell. This happens, because the shortcut to start the management shell generically targets the most recent version of PS installed, not 2.0. If you believe you are having this issue you will likely see an error similar to the one below.

 

Error: "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered."
When trying to do any operation for example Get-SPWeb you will get this error message:"Microsoft SharePoint is not supported with version 4.0.30319.17929 of the Microsoft .Net Runtime."

 

 

 

As of today (1/7/2013) there is no public fix for this. There is a work around. You need to change the target for the SharePoint 2010 Management Shell shortcut to the following. This specifically targets the 2.0 version of PS, which the SP2010 commandlets are compatible with.


C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

Version history
Last update:
‎Apr 28 2020 12:15 PM
Updated by: