PowerShell Logo Small

New-ADGroup



This is the built-in help made by Microsoft for the command 'New-ADGroup', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates an Active Directory group.

SYNTAX


New-ADGroup [-Name] <String> [-GroupScope] {DomainLocal | Global | Universal} [-AuthType {Negotiate | Basic}] [-Credential <PSCredential>] [-Description <String>]
[-DisplayName <String>] [-GroupCategory {Distribution | Security}] [-HomePage <String>] [-Instance <ADGroup>] [-ManagedBy <ADPrincipal>] [-OtherAttributes <Hashtable>]
[-PassThru] [-Path <String>] [-SamAccountName <String>] [-Server <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-ADGroup cmdlet creates a new Active Directory group object. Many object properties are defined by setting cmdlet parameters. Properties that cannot be set by cmdlet
parameters can be set using the OtherAttributes parameter.


The Name and GroupScope parameters specify the name and scope of the group and are required to create a new group. You can define the new group as a security or distribution
group by setting the GroupType parameter. The Path parameter specifies the container or organizational unit (OU) for the group.


The following methods explain different ways to create an object by using this cmdlet.


Method 1: Use the New-ADGroup cmdlet, specify the required parameters, and set any additional property values by using the cmdlet parameters.


Method 2: Use a template to create the new object. To do this, create a new group object or retrieve a copy of an existing group object and set the Instance parameter to
this object. The object provided to the Instance parameter is used as a template for the new object. You can override property values from the template by setting cmdlet
parameters. For more information, see the Instance parameter description for this cmdlet.


Method 3: Use the Import-CSV cmdlet with the New-ADGroup cmdlet to create multiple Active Directory group objects. To do this, use the Import-CSV cmdlet to create the custom
objects from a comma-separated value (CSV) file that contains a list of object properties. Then pass these objects through the pipeline to the New-ADGroup cmdlet to create
the group objects.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=291067
Import-CSV
Get-ADGroup
Remove-ADGroup
Set-ADGroup

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>New-ADGroup -Name "RODC Admins" -SamAccountName RODCAdmins -GroupCategory Security -GroupScope Global -DisplayName "RODC Administrators" -Path
"CN=Users,DC=Fabrikam,DC=Com" -Description "Members of this group are RODC Administrators"



This command creates a new group named RODC Admins in the container CN=Users,DC=Fabrikam,DC=Com and set the GroupCategory, DisplayName, GroupScope, and Description
properties on the new object.




-------------------------- EXAMPLE 2 --------------------------

PS C:\>Get-ADGroup FabrikamBranch1 -Properties Description | New-ADGroup -Name Branch1Employees -SamAccountName Branch1Employees -GroupCategory Distribution -PassThru
GroupScope : Universal
Name : Branch1Employees
GroupCategory : Distribution
SamAccountName : Branch1Employees
ObjectClass : group
ObjectGUID : 8eebce44-5df7-4bed-a98b-b987a702103e
SID : S-1-5-21-41432690-3719764436-1984117282-1117
DistinguishedName : CN=Branch1Employees,CN=Users,DC=Fabrikam,DC=com



This command creates a new group using the property values from a current group.




-------------------------- EXAMPLE 3 --------------------------

PS C:\>New-ADGroup -Server localhost:60000 -Path "OU=AccountDeptOU,DC=AppNC" -Name AccountLeads -GroupScope DomainLocal -GroupCategory Distribution



This command creates a new group named AccountLeads on an AD LDS instance.