SharePoint: No content was exported. Access denied for site collection
Applies to
This is valid for Sharepoint 2010, 2013 and 2016
Problem
Error message
Executing Export-SPWeb to export a site (i.e., web) results in this error message:
Export-SPWeb : No content was exported. Access denied for site collection [url] At line:1 char:13 + Export-SPWeb <<<< -Identity [url] -Path [path] -Comp ressionSize "1000" -IncludeUserSecurity -IncludeVersions "All" -UseSqlSnapshot + CategoryInfo : InvalidData: (Microsoft.Share...CmdletExportWeb:SPCmdletExportWeb) [Export-SPWeb], SPException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletExportWeb
Troubleshooting
The following are basic troubleshooting steps you can perform. These steps check for all of the routine permission requirements associated with executing the commandlet itself:
- Verify Export-SPWeb was executed in an elevated shell.
- Check that your user account has shell access: Get-SPShellAdmin.
- Verify that your user account has at least WRITE permission to the folder you want to export to.
- Verify that your user account has the dbo_owner database role to the farm configuration database and to the content database hosting the site you want to export.
- Verify that your user account has at least the securityadmin database server role.
- Verify that your user account is a member of the Administrators group on the SharePoint farm server on which you are executing the commandlet.
- Verify that your user account is a member of the farm administrator group.
If all these requirements are met, and the problem persists, the problem may have to do with using the UseSqlSnapShot parameter of Export-SPWeb, which introduces additional requirements, including:
- The SQL Server must be a version that actually support snapshots
- The source database must be online
- If you use database mirroring, the database must be in the SYNCHRONIZED state
- The database cannot be configured as scalable shared
- The database must not contain a MEMORY_OPTIMIZED_DATA filegroup
If the basic requirements are met, and you don't really need to use snapshots for executing Export-SPWeb, consider dropping the UseSqlSnapShot parameter.
Solution
- Verify that the domain account under which Export-SPWeb is being executed meets all of the basic permission requirements.
- If the problem persists, verify the additional requirements associated with using the UseSqlSnapShot parameter are also being met or consider dropping this parameter altogether.
References
- Export-SPWeb - Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
- Get-SPShellAdmin
- Export-SPWeb
- Export sites, lists, or document libraries in SharePoint Server
- Database Snapshots (SQL Server)
- How Database Snapshots Work
Notes
- Having exported small sites (<100MB) many times without using UseSqlSnapShot and have not observed significant performance impact on corporate intranet farms receiving < 80K daily hits.