I'm a global administrator, and I'm trying to run the ExportWeb method from https://mytenant-admin.sharepoint.com/_vti_bin/sites.asmx in SharePoint Online. When I run the following script, I get the response 3, and I learned from the comments of this article that 3 means an argument is invalid. Can anybody tell me what I'm doing wrong? The only thing I can think of is that this does not work in SharePoint Online.

Prerequisite: I want to export https://mytenant.sharepoint.com/sites/siteA to the document library at https://mytenant.sharepoint.com/sites/siteB/Shared%20Documents/Forms/AllItems.aspx. Both locations already exist, both sites are modern team sites, and I have confirmed that there is enough space for the operation. I have tried the script both with the ending /Forms/AllItems.aspx and without it.

PowerShell I Ran:

$svc=New-WebServiceProxy -Uri "https://mytenant-admin.sharepoint.com/_vti_bin/Sites.asmx?WSDL" -Credential $cred
$svc.ExportWeb("siteExportJob", "https://mytenant.sharepoint.com/sites/SiteA", "https://mytenant.sharepoint.com/sites/SiteB/Shared%20Documents/Forms/AllItems.aspx", $true, $true, $false, 1024)  

I looked at this question, but it never received an answer, and my problem is that an argument is invalid.

Edit: Is it possible that this is caused by the export location needing to be on my computer? This would be problematic because I am using a web service proxy.

  • There is no PowerShell command available for backup and restore in SharePoint Online. Reference Jul 19, 2020 at 18:01

1 Answer 1


The problem might be that you should store the backup on your local computer instead of a document library. You'd need to use C# for that, and I don't think you can get the right DLL for SharePoint Online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.