Last active
June 19, 2018 21:16
-
-
Save zplume/73a842cf350bae274609af9dd9a5d03c to your computer and use it in GitHub Desktop.
Script to update the AllowDeletion property of a SharePoint List. Assumes you have already connected to the relevant site with Connect-PnPOnline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory = $true)] | |
[string]$ListTitle, | |
[Parameter(Mandatory = $true)] | |
[bool]$AllowDeletion | |
) | |
$list = Get-PnPList -Identity $ListTitle | |
$list.AllowDeletion = $AllowDeletion | |
$list.Update() | |
$list.Context.ExecuteQuery() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment