SharePoint 2010 and PowerShell 3.0

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 ' "
Comments (5)

  1. Does the recent SP 2010 service pack resolve this issue? Or is SP 2010 service pack 2 still incompatible with powershell 3.0?

  2. Alexander Petrovskiy says:

    command line parameters or application shortcut are good for desktop users. What's about connecting via PSRemoting? THIS is the case.

  3. this excellent post, helped me to resolve my issue

Skip to main content