pnp / PnP-Provisioning-Schema

Office 365 Patterns and Practices - Remote Provisioning Schema
MIT License
159 stars 220 forks source link

Unable to copy SharePoint site - 'Invoke-PnPSiteTemplate : Value does not fall within the expected range' #625

Open rschopmeyer opened 10 months ago

rschopmeyer commented 10 months ago

We are trying to take an xml of the production site and apply to the UAT site. We want to use GitHub to upgrade from our Dev site and would first like to test the upgrade in a copy of the site. Every time I try, I get the error, “Value does not fall within the expected range.”

This is a complex application that uses Power Apps on the backend. There are 4 levels of approvals needed for the documents and is used by our local IT, Division IT, Security, CIO, and Legal teams.

We have tried to use the following commands multiple times with changing the path of the XML file. It has been placed in OneDrive, at the root of my C: drive, in my Documents folder, and in a subfolder on C:/eSource.
Connect-PnPOnline -Url https://xxx.sharepoint.com/sites/prodsite -Interactive Get-pnpsitetemplate -Out "C:\Users\xxx\Documents\prodPnp-Provisioning-FileNew.xml"

Connect-PnPOnline -Url https://xxx.sharepoint.com/sites/‎‎UATSite‎‎ -Interactive Invoke-PnPSiteTemplate -Path "C:\Users\xxx\Documents\prodePnp-Provisioning-FileNew.xml"

These same commands work in a separate tenant using a different application. I found that many of the lists and document libraries were copied over, but all the columns are not included in the lists or libraries.

What would be the recommended method for creating a copy of an existing SharePoint site that uses Power Apps on the backend? We need to test the upgrade. Any help would be appreciated!