Forum Discussion
irshad313
Feb 07, 2024Copper Contributor
Publishing a page template
I created a page template in one of the site and distributed that page template to all the active communication sites through powershell [as a page template]. but the issue is minor version of a temp...
- Feb 09, 2024Thanks for replies, I have achieved my objective with this scripts
$sites = Get-PnPTenantSite -Template SITEPAGEPUBLISHING#0
foreach($site in $sites)
{
Connect-PnPOnline -Url $site.Url -Interactive
Set-PnPPage -Identity “Templates/Page-From-TemplateTest.aspx” -Publish
}
ganeshsanap
Feb 07, 2024MVP
If you are using PnP PowerShell, you can use the -Publish parameter with the Set-PnPPage cmdlet.
Or you can try like mentioned here: Publish page using PnP.Powershell
Related read: Set a page template as default page template in SharePoint Online
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.