I have to update an .aspx wiki page for a couple hundred of site collections. So I though I'd write a PowerShell script that loops through all site collections and uploads the file (overwriting the old one) to the SitePages library.

My first test resulted in the dreaded 'Revert to template' warning message across the top of the page.

This is probably due to not customizing the existing page, so the page has no association with the site definition.

Has anyone any ideas how to bulk update the .aspx page on multiple site collections?

Thanks for your help.

  • what is the update to wiki page ? – Bhaskar Dhone Aug 23 '18 at 13:58
  • The text layout was changed and with it the arrangement of a webpart. I only know of managing webparts with PowerShell but I'm not aware that it's possible to change the layout. SharePoint Online by the way. Thanks. – colonel_claypoo Aug 24 '18 at 6:14
  • What's the warning message "Reset to site definition" or "Revert to template"? Could you provide your PowerShell code? – JoannaW_MSFT Aug 24 '18 at 7:15
  • I was simply using Get-PnPFile to download and Add-PnPFile to upload an .aspx page from and to the /SItePages library. Once uploaded the page displays the revert to template message. Not reset to site definition, sorry. – colonel_claypoo Aug 24 '18 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.