#StackBounty: #sharepoint-online #powershell #document-library #export #wsdl Can ExportWeb (from sites.asmx) be performed in SharePoint…

Bounty: 50

I am a global administrator in my tenant, and I am 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 that an argument is invalid. Can anybody tell me what I am 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:

$cred=Get-Credential #I used my SharePoint Online global admin credentials
$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.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.