pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
990 stars 663 forks source link

How to create a new News Post with Page Template #2258

Open KVSolutions opened 5 years ago

KVSolutions commented 5 years ago

Reporting an Issue or Missing Feature

Missing Feature

Expected behavior

Create a new news post from the page template using Powershell

Actual behavior

This functionality is achieved only through UI (New Button --> News Post --> Choose a page template) from home page

Steps to reproduce behavior

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.13.1909.0

How did you install the PnP-PowerShell Cmdlets?

ghost commented 5 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

kachihro commented 5 years ago

The command for a new page is : Add-PnPClientSidePage There is a param for 'layout type' - can you try that ? https://www.c-sharpcorner.com/blogs/add-and-manipulate-modern-sharepoint-page-using-pnp-powershell2

KVSolutions commented 4 years ago

Hi @kachihro ,

This is possible for the new client side pages,and can we specify the custom page template as my layout type ,its not allowing me when I try to set it?

I would like to do for the migrated pages using the ConvertTo-PnPClientSidePage from on prem to SPO