I was trying to put my hands around PowerShell and I was encounring a strange error. I was running one cmdlet Get-SPWebApplication in Windows Server 2008 Server and it was throwing this error:
"Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again."
I tried all the cmdlets but the same error keep coming. After some more investigation I found that the solution and it was that the PowerShall needs to be executed as Administrator. While running powershell it shows 2 option:
and all the cmdlets will show the error message as shown. To run the PowerShell scripts we should use the second option of running as Administrator.
2 comments:
Thanks. This solved the same error for me :)
Thank you so much. I keep forgetting that.
Post a Comment