PowerShell Cmdlets with FeatureDependencyId are not registered in SharePoint 2010

Home > Blogs > PowerShell > PowerShell Cmdlets with FeatureDependencyId are not registered in SharePoint 2010

PowerShell Cmdlets with FeatureDependencyId are not registered in SharePoint 2010

Like This Blog 7Spike Xavier
Added by December 19, 2012

I’ve been doing a lot of development on one of my SharePoint 2010 Windows 7 machines lately and I deleted a bunch of site collections and generally cleaned things up to get ready for a new round of projects. 

I popped open the SharePoint 2010 Management Shell to get a feel for what was left and got the following error:

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

What the heck?

I tried to run a quick Get-SPSite and got this:

Double what the heck?  I thought for sure that I did something with one of my development projects…I had done a bunch of stuff with the using Microsoft.SharePoint.Administration; at the top of my C# files so I was a little concerned.  On closer inspection it wasn’t me (I don’t think).  Look at this error:  Microsoft SharePoint is not supported with version 4.0.30319.296 of the Microsoft .Net Runtime

From the errors it seems like an update I did suddenly had my SharePoint 2010 Management Shell using the wrong version of PowerShell or something.

In any case after a little searching I found a work around posted on a Microsoft PFE site: SharePoint 2010 Management Shell – .Net 4.0 runtime version error

The workaround posted didn’t work for me (so close but the order of the parameter was just a bit off)  but one of the comments had the fix.  I added a parameter to the startup target properties of the Shortcut.

 I changed it from:

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

To:

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 ' "

Notice the –Version 2 parameter addition (it matters where it goes by the way) and voilà it all works again:

Whew, that feels great.  And look I’m down to under 20 site collections, this won’t last long even on my dev box! (which  by the way is a Mac Book Pro Boot Camped with Windows 7 and a full SharePoint 2010 Installation along with email!) I use Smarter Tools for the local email server and it works amazingly well)

Enjoy,

Spike Xavier
SharePoint Instructor – Interface Technical Training
Phoenix, AZ

Videos You May Like

Agile Methodology in Project Management

0 105 0

In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management

JavaScript for C# Developers – September 24, 2014

0 361 3

In this video Dan Wahlin demonstrate the similarities and differences between C# and JavaScript and the future of JavaScript (ES6).

Detailed Forensic Investigation of Malware Infections – April 21, 2015

3 408 3

In this IT Security training video, Security expert Mike Danseglio (CISSP / CEH) will perform several malware investigations including rootkits, botnets, viruses, and browser toolbars.

Write a Comment

See what people are saying...

  1. Avatar jasmeet

    thanks man this saved me 

  2. Avatar ROBERTO

    THANK YOU VERI MUCH 🙂

  3. Avatar Aniruddha

    Thanks you very much. it saved a day for me…

  4. Avatar Andrew

    Thanks! Worked like a charm!

  5. Avatar Christie

    Thank you SO much for this. I had been working with a client's SP 2010 Foundation server, and I must have updated something without even realizing it would affect PowerShell. I thought I had "broken" it! 

  6. Avatar Jim

    Thanks much, that fixed my issue.  One question is why did this all of a sudden pop up?  Guessing it was due to a Windows update.

  7. Avatar Victor

    Thank you very much! He was very mad with the error

Share your thoughts...

Please fill out the comment form below to post a reply.