Compartir a través de


Running SharePoint 2010 Management Shell on Windows 8

So, you installed windows 8 pro and got SharePoint 2010 running as your dev environment. The first thing you will notice is that you can no longer execute the SharePoint PowerShell commands. When you open the SharePoint 2010 Management Shell, you get the following error:

"the local farm is not accessible. Cmdlets with FeatureDependencyId are not registered".

 

Well, Windows 8 uses Windows Management Framework 3.0 which includes PowerShell 3.0 which in turn is based on .NET Framework 4.0. Since the SharePoint 2010 Management Shell uses .NET Framework 3.5, we cannot use PowerShell 3.0. Therefore, we have to force the shortcut to use PowerShell 2.0, by specifying the -Version command.

 

Whew!

To make this work, change the target of the shortcut "SharePoint 2010 Management Shell" as follows:

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