SharePoint 2010 and PowerShell 3.0

SharePoint 2010 and PowerShell 3.0

Rate This
  • Comments 5

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 ' "
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post
Page 1 of 1 (5 items)