Danushka Silva

It's all about SharePoint

Error: “Cannot access the local farm” – PowerShell command error

When working with PowerShell I got an error. First I thought I am making some kind of a  mistake because I am new to this as well smile_regular

PowershellError 

So I was struggling to make it happen and finally figured it out. The solution was to have administrator privileges to run PowerShell. So when you want use PowerShell don’t just click on it. Right click and Run as Administrator

PowershellError2

Bingo! Now you can use it.

PowershellError3


Please add a comment if you use this code or it helped you. So I can make my posts better.