Provision publishing page with the search results page layout with pnp provisioning powershell

Occasional Contributor

I am using SharePoint 2013 on prem. I am using the powershell pnp provisioning a lot for many projects and it works great. I know how to provision publishing pages. But at this moment I would like to use the OOTB pagelayout "Search Results"  which is associated to the contenttype "Welcome Page". When I provision my pnp template I see the new publishing page. It has the correct pagelayout, but the contenttype is incorrect. I see another contenttype (default contenttype). What could be the issue?


Here is pnp template part where I try to provision the publishing page:

        <pnp:File Src="Search.aspx" Folder="{site}/Pages" Overwrite="true">
            <pnp:Property Key="ContentTypeId" Value="{contenttypeid:Welcome Page}" />
            <pnp:Property Key="Title" Value="Zoeken" />
            <pnp:Property Key="PublishingPageLayout" Value="{sitecollection}/_catalogs/masterpage/SearchResults.aspx, Zoekresultaten" />
0 Replies