How to create an Azure AD group using PowerShell scripts

Azure Active Directory (Azure AD) groups are used by administrators to simplify administration of users and their permissions efficiently. The cmdlet in the table below can be used to create new Azure AD groups. ADManager Plus, a unified Active Directory, Microsoft 365, Exchange, and Google Workspace management and reporting tool, can also be used to accomplish this task.

The following table is a comparison on how to create an Azure AD Group using PowerShell scripts and ADManager Plus.

Azure PowerShell

Steps to create an Azure AD group using PowerShell scripts:

  1. Note down the required parameters (DisplayName, Description, MailEnabled, MailNickname, SecurityEnabled, IsAssignedToRole, Visibility, etc.) for creating the group.
  2. Execute the following PowerShell script with the required parameters and their values.
 Copied
New-AzureADGroup
-DisplayName "<Displayname>"
-Description "<Description>"
-MailEnabled "<MailEnabled>"
-SecurityEnabled <SecurityEnabled>
-MailNickname "<MailNickname>"
Click to copy entire script

where <Displayname> specifies the name for the group, <Description> specifies a description for the Azure AD group, <MailEnabled> (True or False) signifies whether the Azure AD group is mail enabled or not, <MailNickname> specifies a mail nickname for the Azure AD group, and <SecurityEnabled> (True or False) signifies if the Azure AD group is security enabled

ADManager Plus

Steps to find the owners of an Azure AD group using ADManager Plus:

  1. Log in to ADManager Plus and navigate to Microsoft 365 tab > Management > Group Management.
  2. Under Single Group Creation, click Microsoft365 Group Creation.
  3. Fill in the mandatory attributes.
  4. Select the group members and the owners from the Group tab.
  5. Click Apply.
How to create an Azure AD group using PowerShell scripts
 

Limitations of using PowerShell scripts to create new Azure AD groups

  • Administrators must have sufficient permissions to read memberships of Azure AD groups if they wish to use the above-mentioned PowerShell script. However, one wrong move from the administrator can affect the security posture of your organization.
  • Only technicians with PowerShell expertise can execute this command.
  • PowerShell scripts are time-consuming and can affect productivity.
  • The above mentioned PowerShell script lets you to create a Azure AD group alone. To add members to the created Azure AD group we need to run additional PowerShell scripts which can be complex and time consuming.

Benefits of using ADManager Plus:

  • ADManager Plus lets you create Azure AD groups and add members to those groups, all in one go.
  • ADManager Plus provides you with group creation templates that simplify the process of creating groups in bulk.
  • ADManager Plus comes with an intuitive UI and does not demand an extensive knowledge in PowerShell.

Hassle-free Azure AD group membership management

  Get 30-day free trial.
  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  •  
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link