Table of contents
TOC
Collapse the table of content
Expand the table of content

Set-PnPGroupPermissions

Bert Jansen|Last Updated: 2/20/2017
|
1 Contributor

Adds and/or removes permissions of a specific SharePoint group

Syntax

Set-PnPGroupPermissions -Identity <GroupPipeBind>
                        [-List <ListPipeBind>]
                        [-AddRole <String[]>]
                        [-RemoveRole <String[]>]
                        [-Web <WebPipeBind>]

Parameters

ParameterTypeRequiredDescription
IdentityGroupPipeBindTrueGet the permissions of a specific group by name
AddRoleString[]FalseName of the permission set to add to this SharePoint group
ListListPipeBindFalseThe list to apply the command to.
RemoveRoleString[]FalseName of the permission set to remove from this SharePoint group
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Set-PnPGroupPermissions -Identity 'My Site Members' -AddRole Contribute

Adds the 'Contribute' permission to the SharePoint group with the name 'My Site Members'

Example 2

PS:> Set-PnPGroupPermissions -Identity 'My Site Members' -RemoveRole 'Full Control' -AddRole 'Read'

Removes the 'Full Control' from and adds the 'Contribute' permissions to the SharePoint group with the name 'My Site Members'

Example 3

PS:> Set-PnPGroupPermissions -Identity 'My Site Members' -AddRole @('Contribute', 'Design')

Adds the 'Contribute' and 'Design' permissions to the SharePoint group with the name 'My Site Members'

Example 4

PS:> Set-PnPGroupPermissions -Identity 'My Site Members' -RemoveRole @('Contribute', 'Design')

Removes the 'Contribute' and 'Design' permissions from the SharePoint group with the name 'My Site Members'

Example 5

PS:> Set-PnPGroupPermissions -Identity 'My Site Members' -List 'MyList' -RemoveRole @('Contribute')

Removes the 'Contribute' permissions from the list 'MyList' for the group with the name 'My Site Members'

© 2017 Microsoft