SOLVED

Advanced Doc Library Settings with PowerShell - i.e. turn off "New Folder"

Brass Contributor

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 available?" to "No" and I'd like to change the value for "Default open behavior for browser-enabled documents:" to "Open in the Client Application".

 

I've had a look around at various properties, but just can't seem to find it.  Any pointers greatly received.

 

Many thanks,

D.

1 Reply
best response confirmed by VI_Migration (Silver Contributor)
Solution
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()
1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution
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()

View solution in original post