Can't migrate SharePoint pages using PnP PowerShell

%3CLINGO-SUB%20id%3D%22lingo-sub-2267229%22%20slang%3D%22en-US%22%3ECan't%20migrate%20SharePoint%20pages%20using%20PnP%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2267229%22%20slang%3D%22en-US%22%3E%3CP%3ESo%20I%20need%20to%20move%20the%20site%20pages%20from%20my%20SharePoint%20dev%20environment%20to%20another%20environment%20using%20PnP%20PowerShell.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20get%20the%20site%20template%20with%20pages%20and%20lists%20using%20below%20command.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EGet-PnPSiteTemplate%20-Out%20test.xml%3C%2FSTRONG%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3Emy%20issue%20was%20in%20my%20generated%20xml%20file.%20there%20was%20my%20old%20environment%20users%20are%20present%20as%20authors%20in%20pages%20details%20.so%20the%20PnP%20cmdlet%20not%20creating%20sites%20in%20new%20environment.%20I%20used%20the%20below%20command.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EInvoke-PnPSiteTemplate%20-Path%20test.xml%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3Emy%20question%20is%20how%20to%20move%20the%20site%20pages%20to%20another%20environment%20without%20any%20old%20dev%20users.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

So I need to move the site pages from my SharePoint dev environment to another environment using PnP PowerShell.

I get the site template with pages and lists using below command.

Get-PnPSiteTemplate -Out test.xml 

my issue was in my generated xml file. there was my old environment users are present as authors in pages details .so the PnP cmdlet not creating sites in new environment. I used the below command.

Invoke-PnPSiteTemplate -Path test.xml

my question is how to move the site pages to another environment without any old dev users.

0 Replies