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

Set-PnPGroup

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

Updates a group

Syntax

Set-PnPGroup -Identity <GroupPipeBind>
             [-SetAssociatedGroup <AssociatedGroupType>]
             [-AddRole <String>]
             [-RemoveRole <String>]
             [-Title <String>]
             [-Owner <String>]
             [-Description <String>]
             [-AllowRequestToJoinLeave <Boolean>]
             [-AutoAcceptRequestToJoinLeave <Boolean>]
             [-AllowMembersEditMembership <Boolean>]
             [-OnlyAllowMembersViewMembership <Boolean>]
             [-RequestToJoinEmail <String>]
             [-Web <WebPipeBind>]

Parameters

ParameterTypeRequiredDescription
IdentityGroupPipeBindTrueA group object, an ID or a name of a group
AddRoleStringFalseName of the permission set to add to this SharePoint group
AllowMembersEditMembershipBooleanFalseA switch parameter that specifies whether group members can modify membership in the group
AllowRequestToJoinLeaveBooleanFalseA switch parameter that specifies whether to allow users to request membership in the group and to allow users to request to leave the group
AutoAcceptRequestToJoinLeaveBooleanFalseA switch parameter that specifies whether users are automatically added or removed when they make a request
DescriptionStringFalseThe description for the group
OnlyAllowMembersViewMembershipBooleanFalseA switch parameter that specifies whether only group members are allowed to view the list of members in the group
OwnerStringFalseThe owner for the group, which can be a user or another group
RemoveRoleStringFalseName of the permission set to remove from this SharePoint group
RequestToJoinEmailStringFalseThe e-mail address to which membership requests are sent
SetAssociatedGroupAssociatedGroupTypeFalseOne of the associated group types (Visitors, Members, Owners
TitleStringFalseThe title for the group
WebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.

Examples

Example 1

PS:> Set-PnPGroup -Identity 'My Site Members' -SetAssociatedGroup Members

Sets the SharePoint group with the name 'My Site Members' as the associated members group

Example 2

PS:> Set-PnPGroup -Identity 'My Site Members' -Owner 'site owners'

Sets the SharePoint group with the name 'site owners' as the owner of the SharePoint group with the name 'My Site Members'

© 2017 Microsoft