Active Directory: Create a group in PowerShell


Windows Server 2012R2 Windows Server 2016 Windows Server 2019

In this tutorial, we will see how to create an Active Directory group from a domain controller in PowerShell using the New-ADGroup cmdlet.

Syntax to create a group in PowerShell:

New-ADGroup -Name "NomDuGroupe" -GroupeScope "Etendue du groupe" -Path "OU=OU_du_Groupe,DC=domain,DC=lan"

Example: Create the SysAdmin group in the OU Groups which is located in the OU IT.

New-AdGroup -Name "SysAdmin" -GroupScope Global -Path "OU=Groups,OU=IT,DC=LAB,DC=INTRA"

Create a group in Active Directory using PowerShell

Ouvrir une invite de commande PowerShell

On a domain controller, open a PowerShell window or from a command prompt enter the powershell command.

Use the New-ADGroup cmdlet

Use the New-ADGroup cmdlet to create an Active Directory group.

New-AdGroup -Name "SysAdmin" -GroupScope Global -Path "OU=Groups,OU=IT,DC=LAB,DC=INTRA"

Check group creation

To verify that the group is created, use the Get-ADGroup cmdlet.

Get-ADGroup -Identity SysAdmin



Leave a Comment