This project has moved and is read-only. For the latest updates, please go here.

Access is denied

Dec 22, 2013 at 1:18 AM
When I run this script on my sharepoint 2013, server 2012 machine as domain administrator I get the following error in red text. Any ideas anyone?

Regards

Get-SPWeb : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At line:29 char:48
  • $subsites = Get-SPSite $Site.Url | Get-SPWeb -Limit All
  • ~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidData: (Microsoft.Share....SPCmdletGetWeb:SPCmdletGetWeb) [Get-SPWeb], Unauthorize
      dAccessException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetWeb
Get-SPWeb : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At line:29 char:48
  • $subsites = Get-SPSite $Site.Url | Get-SPWeb -Limit All
  • ~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidData: (Microsoft.Share....SPCmdletGetWeb:SPCmdletGetWeb) [Get-SPWeb], Unauthorize
      dAccessException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetWeb