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.
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.
SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/
Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/
You can contact me using contact@sharepains.com