
Write-Warning “Checking permissions $($FolderPath)” Update the folder permissions without creating a new version or triggering MS Flow.Hm ran it on my laptop since I don’t have any file share to connect to at the moment and it returned the root and the folders, it doesn’t get folders more than one level down though. The role that must be removed from the group or user Type: String The ID, Title or Url of the list the folder is part of Type: ListPipeBind Inherit permissions from the parent, removing unique permissions Type: SwitchParameter The ID of the folder, the server relative URL to the folder or actual Folder object Type: FolderPipeBind Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Optional connection to be used by the cmdlet.

The role that must be assigned to the group or user Type: StringĬlear all existing permissions Type: SwitchParameter Resets permissions for the folder named 'Folder' located in the root of the library 'Shared Documents' to inherit permissions from the library 'Shared Documents' PARAMETERS -AddRole Removes the 'Contribute' permission to the user for the folder named 'Subfolder' located in the folder 'Folder' which is located in the root of the library 'Shared Documents' EXAMPLE 3 Set-PnPFolderPermission -List 'Documents' -Identity 'Shared Documents\Folder' -User -AddRole 'Contribute' -ClearExistingĪdds the 'Contribute' permission to the user for the folder named 'Folder' located in the root of the library 'Shared Documents' and removes all other permissions EXAMPLE 4 Get-PnPFolder -Url 'Shared Documents\Folder' | Set-PnPFolderPermission -List 'Documents' -InheritPermissions Inherit Set-PnPFolderPermission -Identity ĭESCRIPTION EXAMPLES EXAMPLE 1 Set-PnPFolderPermission -List 'Shared Documents' -Identity 'Shared Documents\Folder' -User -AddRole 'Contribute'Īdds the 'Contribute' permission to the user for the folder named 'Folder' located in the root of the library 'Shared Documents' EXAMPLE 2 Set-PnPFolderPermission -List 'Documents' -Identity 'Shared Documents\Folder\Subfolder' -User -RemoveRole 'Contribute'

Group Set-PnPFolderPermission -Identity -Group SYNTAX User (Default) Set-PnPFolderPermission -Identity -User Use Get-PnPRoleDefinition to retrieve all available roles you can add or remove using this cmdlet.
