PnP Pwershell
2 TopicsSite Columns created by PNP Powershell not showing up in Highlighted Content Webpart
Hi there, i'm getting stuck in creating some custom colums for the "Site Pages" library - to deploy some colums automatically. I can create collumns by pnp like this: $siteurl = "https://domain.sharepoint.com/sites/2501" Connect-PnPOnline -Url $SiteURL -Interactive $SitePagesList = Get-PNPList |? { $_.Title -eq "Websiteseiten" -or $_.Title -eq "SitePages" } $DisplayName = "Redakteur2" $PNPField = Add-PnPField -List $SitePagesList -InternalName $DisplayName -DisplayName $DisplayName -Type User -AddToDefaultView -Required -AddToAllContentTypes [XML]$SchemaXml = $PNPField.SchemaXml $SchemaXml.Field.SetAttribute("Mult","TRUE") $SchemaXml.Field.SetAttribute("UserDisplayOptions","NamePhoto") $OuterXML = $SchemaXml.OuterXml.Replace('Field Type="User"','Field Type="UserMulti"') Set-PnPField -List $SitePagesList -Identity $PNPField.Id -Values @{SchemaXml =$OuterXML} -UpdateExistingLists They show up correctly under site pages: But I cant select the column Redakteur in the Webpart "Highlighted Content": In the webpart only from hand created properties show up. Am i wrong here somehow? If I compare the ouput of both fields from: Get-PnPField -List $SitePagesList -Identity "XXXXXXX-be4a-429b-9b2a-6207e7f85535" | fl * I dont see a big difference. I've aswell tried creating the field and setting the difference options like UserSelectionMode. But this didn't make a difference. Does anybody out there has an idea what is wrog here? Or otherwise how I can deploy some custom colums for the existing site pages library? I've tried this aswell with the command below, but this creates me a new Page Library with the same name. Seems a bug in PNP Powershell.... $siteScript = .... "verb": "createSPList", "listName": "Site Pages", "templateType": 119, "subactions": [ { "displayName": "Redakteur", "isRequired": true, "addToDefaultView": false, "fieldType": "User", "enforceUnique": false, "verb": "addSPField" }, ..... Invoke-PnPSiteScript -WebUrl $siteurl -Script $siteScript Kind regards, ConstantinSolved1.8KViews0likes3CommentsSharePoint 2019(On Prem) - How to convert from classic publishing site to modern communication site
Hi, I am new to SharePoint modern view , we have requirement to convert the classic publishing site to modern communication site. I have created the site collection using classic publising site and now i want to convert to modern communication site. Is there any PnP Powershell command to convert the site template for SharePoint 2019 on prem. Thanks1.5KViews0likes1Comment