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:
- Note down the required parameters (DisplayName, Description, MailEnabled, MailNickname, SecurityEnabled, IsAssignedToRole, Visibility, etc.) for creating the group.
- 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:
- Log in to ADManager Plus and navigate to Microsoft 365 tab > Management > Group Management.
- Under Single Group Creation, click Microsoft365 Group Creation.
- Fill in the mandatory attributes.
- Select the group members and the owners from the Group tab.
- Click Apply.
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.