In this blog, we will look at the steps to add and manipulate Modern SharePoint page using PnP PowerShell.
Adding a Modern page to the SharePoint site
The Add-PnPClientSidePage command is used to add a modern page to the SharePoint site.
By default, Add-PnPClientSidePage creates an Article layout type. To create the Home layout type, we have to pass “Home” as a “LayoutType” parameter.
Set the Modern page Property
The Set-PnPClientSidePage command is used to update the property of a SharePoint Modern page.
This example updates the properties of the modern page named “MyPage”.
This example disables the comments on the Modern page.
This example enables the comments on the Modern page.
Getting the Modern page information
The Get-PnPClientSidePage command is used to get information about the SharePoint Modern page.
Removing a Modern page from the SharePoint site
The Remove-PnPClientSidePage command is used to remove the specified modern page from the SharePoint site collection.
This solution is brought to you by our SharePoint professionals.
Softree Technology employs SharePoint consultants; we are a technology services provider with the aim to help companies achieve exceptional performance through SharePoint. Our dedicated team of SharePoint consultants has the right bent of mind to understand and execute customer requirements.
Be it SPFx or SharePoint add-in developments, SharePoint 2019 developments, web part developments, migrating from SharePoint 2010/2013 to SharePoint 2013/2016/Office 365, Office 365, SharePoint hosted apps development or something else in SharePoint, we strive to deliver the best