New-PnPGroup

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/New-PnPGroup.md to change this file.

Adds group to the Site Groups List and returns a group object

Syntax

New-PnPGroup
   -Title <String>
   [-Description <String>]
   [-Owner <String>]
   [-AllowRequestToJoinLeave]
   [-AutoAcceptRequestToJoinLeave]
   [-AllowMembersEditMembership]
   [-OnlyAllowMembersViewMembership]
   [-DisallowMembersViewMembership]
   [-RequestToJoinEmail <String>]
   [-SetAssociatedGroup <AssociatedGroupType>]
   [-Connection <PnPConnection>]
   [<CommonParameters>]

Examples

EXAMPLE 1

New-PnPGroup -Title "My Site Users"

Parameters

-AllowMembersEditMembership

A switch parameter that specifies whether group members can modify membership in the group

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AllowRequestToJoinLeave

A switch parameter that specifies whether to allow users to request membership in the group and to allow users to request to leave the group

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AutoAcceptRequestToJoinLeave

A switch parameter that specifies whether users are automatically added or removed when they make a request

Type:SwitchParameter
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

The description for the group

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisallowMembersViewMembership

A switch parameter that disallows group members to view membership.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnlyAllowMembersViewMembership

{{ Fill OnlyAllowMembersViewMembership Description }}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Owner

The owner for the group, which can be a user or another group

Type:String
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SetAssociatedGroup

{{ Fill SetAssociatedGroup Description }}

Type:AssociatedGroupType
Accepted values:None, Visitors, Members, Owners
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Title

The Title of the group

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False