Forum Discussion

wozspot's avatar
wozspot
Copper Contributor
Nov 13, 2020

PNP SharePoint Modern Lists DefaultEditFormUrl

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

  • Wonderplayer's avatar
    Wonderplayer
    Copper Contributor
    If still relevant:
    Set-PnPSite -DenyAndAddCustomizePages:$false
    $list.DefaultEditFormUrl = "<URL>"

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

Resources