Error Statement- Trying to Copy SharePoint Document Library folder from Site to another site by using PnP Command as mentioned below-
Connect-PnPOnline https://tenantname1.sharepoint.com/
$sourceurl= "Documents/MyProjectfiles"
$targeturl= "https://tenantname2.sharepoint.com /sites/otherproject/Shared Documents"
Copy-PnPFolder -SourceUrl $sourceurl -TargetUrl $targeturl -Overwrite
Run the script but getting below given error.
Copy-PnPFolder: The Remote Server Returned an Error: (404) Not Found.
Solution-
In above script, Source URL is of tenantname1 and target URL is of tenantname2. In SharePoint Online, Data can not be copied between two tenant. Copy-PnPFolder can copy data in same site, same site collection, or even in different site collection in same tenant.
That's why command is return error.
Comments
Post a Comment