Επεξεργασία

Κοινή χρήση μέσω


New-AzureADGroup

Creates a group.

Syntax

New-AzureADGroup
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Description <String>]
   -DisplayName <String>
   -MailEnabled <Boolean>
   -MailNickName <String>
   -SecurityEnabled <Boolean>
   [<CommonParameters>]

Description

The New-AzureADGroup cmdlet creates a group in the Microsoft Entra ID.

Examples

Example 1: Create a group

PS C:\>New-AzureADGroup -DisplayName "My new group" -MailEnabled $false -SecurityEnabled $true -MailNickName "NotSet"

ObjectId                             DisplayName  Description
--------                             -----------  -----------
11fa5e1e-737c-40c5-835e-416ae3959606 My new group

Parameters

-Description

Specifies a description of the group.

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

-DisplayName

Specifies the display name of the group.

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

-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

Specifies an information variable.

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

-MailEnabled

Indicates whether mail is enabled.

Type:Boolean
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MailNickName

Specifies a nickname for mail.

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

-SecurityEnabled

Indicates whether the group is security-enabled.

Type:Boolean
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Notes

See the migration guide for New-AzureADGroup to the Microsoft Graph PowerShell.