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.

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

Leave a Reply

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

%d bloggers like this: