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:

  1. Verify Export-SPWeb was executed in an elevated shell.
  2. Check that your user account has shell access: Get-SPShellAdmin.
  3. Verify that your user account has at least WRITE permission to the folder you want to export to.
  4. 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.
  5. Verify that your user account has at least the securityadmin database server role.
  6. Verify that your user account is a member of the Administrators group on the SharePoint farm server on which you are executing the commandlet.
  7. 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

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.