Every now and then when I run my SharePoint PowerShell scripts I’m getting the following error:

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

I keep forgetting about the solution so I thought I create my favourite type of blog articles. A short blog article.

Making a user Shell Admin

So I need to make my user a Shell admin with this command

Add-SPShellAdmin -UserName CONTOSO\User1

Easy, I start my SharePoint Management Shell and run the above command and … my next error:

You need to have machine administrator privileges to run this cmdlet

Don’t forget to run the shell as an administrator with the run as administrator option.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. You can contact me using contact@sharepains.com

Related Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading