Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc.

Problem: Getting “Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))” on running PowerShell cmdlets, such as: Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser

Solution: 

Add a web application user policy with Full control for the Farm Administrator who runs the Script!

  • Open SharePoint 2016/2013/2010 Central Administration site as a Farm Administrator
  • Click Application Management >> Select Manage Web Applications.
  • Select your target web application >> Click the User Policy button from the ribbon.
  • From the Policy for Web Application dialog box, click on “Add Users” link.
  • Select All Zones for the web application and click on Next
  • Enter the user account and Select the permission policy level as “Full Control”
  • Click Finish to save your changes. 
    Get-SPWeb: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

One thought on “Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc.

  • Me sirvió completamente para acceder al listado del Web applicacion

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *