New-PnPEntraIDGroup
SYNOPSIS
Required Permissions
- Microsoft Graph API : One of Directory.ReadWrite.All, Group.Create, Group.ReadWrite.All
Creates a new Entra ID group. This can be a security or distribution group.
SYNTAX
New-PnPEntraIDGroup -DisplayName <String> -Description <String> -MailNickname <String> [-Owners <String[]>] [-Members <String[]>] [-IsSecurityEnabled <SwitchParameter>] [-IsMailEnabled <SwitchParameter>] [-Force]
DESCRIPTION
Allows to create an Entra ID group. This can be either security or distribution group.
EXAMPLES
EXAMPLE 1
New-PnPEntraIDGroup -DisplayName $displayName -Description $description -MailNickname $nickname
Creates an Entra ID group with all the required properties
EXAMPLE 2
New-PnPEntraIDGroup -DisplayName $displayName -Description $description -MailNickname $nickname -Owners $arrayOfOwners -Members $arrayOfMembers
Creates a new Entra ID group with all the required properties, and with a custom list of Owners and a custom list of Members
EXAMPLE 3
New-PnPEntraIDGroup -DisplayName $displayName -Description $description -MailNickname $nickname -IsSecurityEnabled -IsMailEnabled
Creates a new Entra ID group which is mail and security enabled
PARAMETERS
-Description
The Description of the Entra ID group
Type: String
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DisplayName
The Display Name of the Entra ID group
Type: String
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IsSecurityEnabled
Creates an Entra ID group which can be used to set permissions
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IsMailEnabled
Creates an Entra ID group which can be used to send e-mail to
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Specifying the Force parameter will skip the confirmation question.
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MailNickname
The Mail Nickname of the Entra ID group. Cannot contain spaces.
Type: String
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Members
The array UPN values of the group's members
Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Owners
The array UPN values of the group's owners
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 Microsoft Graph documentation