Home » Office 365 » New-MsolGroup – Create a New Group in Office 365

New-MsolGroup – Create a New Group in Office 365

The New-MsolGroup cmdlet in PowerShell adds a new security group to Microsoft Office 365.

The syntax to create a new group in the Azure Active Directory is given below.

New-MsolGroup
   [-DisplayName <String>]
   [-Description <String>]
   [-ManagedBy <String>]
   [-TenantId <Guid>]
   [<CommonParameters>]

In this article, we will discuss how to use the New-MsolGroup cmdlet in PowerShell to add a new group to the Azure Active Directory.

How to Create a Security Group in Office 365

To create a new security group in Office 365, use the New-MsolGroup cmdlet with the -DisplayName and -Description parameters.

The -Displayname parameter specifies the display name of the group and the -Description parameter specifies a description of the group.

New-MsolGroup -DisplayName "LabView" -Description "LabView group"

This command creates a security group called “LabView“.

Create a New Security Group in Office 365
Create a New Security Group in Office 365

The output of the New-MsolGroup cmdlet includes the following properties.

  • ObjectId: The unique ID of the group.
  • DisplayName: A display name of the group.
  • GroupType: The type of group. Types can be Security, DistributionList, or MailEnabledSecurityGroup.
  • Description: A description of the group.

Conclusion

I hope the above article on how to use the New-MsolGroup cmdlet in PowerShell to add a new group to Office 365 is helpful to you.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.

Related Links

Get-MsolGroup

Set-MsolGroup

Remove-MsolGroup