Skip to content

Script to delete unique permissions on all items/docs in a Document Library #347

Answered by ToddKlindt
NaveedBajwa asked this question in Q&A
Discussion options

You must be logged in to vote

I haven't ever done this, but in my head it looks something like this:

$ListList = (Get-PnPList -Includes IsSystemList).Where({$_.IsSystemList -EQ $false})
Foreach ($List in $ListList) {
   Get-PnPListItem -List $List | Set-PnPListItemPermission -InheritPermissions -List $List
}

Doublecheck it, but that should do it.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@NaveedBajwa
Comment options

@ToddKlindt
Comment options

@NaveedBajwa
Comment options

Answer selected by gautamdsheth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants