Search Results for

    Show / Hide Table of Contents

    Set-PnPGroup

    SYNOPSIS

    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>] [-Connection <PnPConnection>] 
    

    DESCRIPTION

    This cmdlet updates the roles and settings of the specified group.

    EXAMPLES

    EXAMPLE 1

    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

    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'.

    PARAMETERS

    -AddRole

    Name of the role (permission level) to add to the SharePoint group.

    Type: String
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -AllowMembersEditMembership

    Specifies whether group members can modify membership in the group.

    Type: Boolean
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -AllowRequestToJoinLeave

    Specifies whether users are allowed to request membership in the group or to request to leave the group.

    Type: Boolean
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -AutoAcceptRequestToJoinLeave

    Specifies whether users are automatically added or removed when they make a request.

    Type: Boolean
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Connection

    Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

    Type: PnPConnection
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Description

    The description of the group.

    Type: String
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Identity

    A group object, an ID or a name of a group.

    Type: GroupPipeBind
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -OnlyAllowMembersViewMembership

    Specifies whether only group members are allowed to view the list of members in the group.

    Type: Boolean
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Owner

    The owner of the group. It can be a user or another group.

    Type: String
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -RemoveRole

    Name of the role (permission level) to remove from the SharePoint group.

    Type: String
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -RequestToJoinEmail

    The e-mail address to which membership requests are sent.

    Type: String
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -SetAssociatedGroup

    One of the associated group types (Visitors, Members, Owners).

    Type: AssociatedGroupType
    Parameter Sets: (All)
    Accepted values: None, Visitors, Members, Owners
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Title

    The title of the group.

    Type: String
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer