SharePoint 2010 PowerShell or PowerShell ISE throwing - “The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.” when loading SharePoint PowerShell module

 

Recently I started facing this issue.

Whenever, I load the PowerShell ISE and Type the command to load the SharePoint PowerShell module, it starts throwing error

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

The same error comes up in the SharePoint Management Shell.

The reason could be you installed Windows Management Framework 3.0 via Windows Update or manually.

If you like Windows to automatically update in the background or you do it manually, but don’t read through each KB, the same could happen in your SP 2010 farm.

The KB that causes this is http://www.microsoft.com/en-us/download/details.aspx?id=34595.

It installs Windows Management Framework 3.0 and then PowerShell will start loading .Net framework 4.0.

SharePoint 2010 does not like .Net 4.0 and starts failing.

Resolution: http://support.microsoft.com/kb/2796733

OR

(What I have done)

Go to Control Panel –> Program & Features –> View Installed Updates and Search for the KB that corresponds to your Server’s patch version & uninstall that KB. Post uninstallation reboot the server.

· Windows Server 2008 R2 SP1

· 64-bit versions: Windows6.1-KB2506143-x64.msu

· Windows Server 2008 Service Pack 2

· 64-bit versions: Windows6.0-KB2506146-x64.msu

· 32-bit versions: Windows6.0-KB2506146-x86.msu

N.B. The above info is valid for SharePoint 2010 only.