I was recently added as administrator to a SharePoint server farm. I was able to access the Central Administration with no problem. But the issue was that PowerShell was not working. I got this error message when I started the "SharePoint 2010 Management Shell":
The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered..
Also when I tried to start the SharePoint Manager 2010 I get this error: "Object reference not set to an instance of an object"
I have had this error before and I got a lot of trouble with Powergui at that Time too. To get this work you need make sure the logged user has rights to the SharePoint Configuration Database (db_owner and SharePoint_Shell_Access)
But be aware that direct changes to the SharePoint DB are not supported by Microsoft. To make this right use the Add-SPShellAdmin PowerShell command with an Administrator account:
Add-SPShellAdmin -username MyUserName
Now you can user Powershell but you will get this error when trying to access a Site with: "Get-SPWeb $url"
Cannot find SPWeb object with 'Id' or URL:"
You need to grant rigths on the content databses using this commands:
> $contentDB = get-spcontentdatabase -site http://server/site
> add-spshelladmin -UserName DOMAIN\Username -database $contentDB
Thanks to this Blog
Keine Kommentare:
Kommentar veröffentlichen