Forum Discussion
Darren Parkinson
Sep 25, 2017Brass Contributor
Advanced Doc Library Settings with PowerShell - i.e. turn off "New Folder"
I'd like to be able to programmatically modify some of the advanced settings on some document libraries using PnP Powershell. Specifically, I'd like to be able to set "Make "New Folder" command a...
- Sep 25, 2017Managed to turn off "New Folder" with the following:
$ctx = Get-PnPContext
$ndl = Get-PnPList -Identity $Url
$ctx.Load($ndl)
$ctx.ExecuteQuery()
$ndl.EnableFolderCreation = $false
$ndl.Update()
$ctx.ExecuteQuery()
Darren Parkinson
Sep 25, 2017Brass Contributor
Managed to turn off "New Folder" with the following:
$ctx = Get-PnPContext
$ndl = Get-PnPList -Identity $Url
$ctx.Load($ndl)
$ctx.ExecuteQuery()
$ndl.EnableFolderCreation = $false
$ndl.Update()
$ctx.ExecuteQuery()
$ctx = Get-PnPContext
$ndl = Get-PnPList -Identity $Url
$ctx.Load($ndl)
$ctx.ExecuteQuery()
$ndl.EnableFolderCreation = $false
$ndl.Update()
$ctx.ExecuteQuery()