The local farm is not accessible

My Problem

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.

Your Solution

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.

 

 

Advertisements

Please leave a comment or feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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