PNP SharePoint Modern Lists DefaultEditFormUrl

Copper Contributor

Hi,

 

Is there a way with PNP PowerShell to change a modern lists (SharePoint Online) default DefaultEditFormUrl.  I know we can get the current values, but looking for a way to set it to my own custom page.  

 

Connect-PnPOnline -Url "https://tenanr.sharepoint.com/sites/x"
$list = Get-PnPList -Identity "listane" -Includes DefaultDisplayFormUrl, DefaultEditFormUrl, DefaultNewFormUrl
$list.DefaultDisplayFormUrl
$list.DefaultEditFormUrl
$list.DefaultNewFormUrl

 

Thanks :)

1 Reply
If still relevant:
Set-PnPSite -DenyAndAddCustomizePages:$false
$list.DefaultEditFormUrl = "<URL>"

Unless you disable protection you can't change the URL.