DSADD Group (installable option via RSAT /AD DS)

Add a group to active directory.

Syntax
      DSADD Group GroupDN [-secgrp {yes | no}] [-scope {l | g | u}] [-samid SAMName]
         [-desc Description] [-memberof Group ...] [-members Member ...]
            [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}]
               [-q] [{-uc | -uco | -uci}]

Key
   Group_DN  Distinguished name of the group that you want to add.
             If omitted will be taken from standard input (stdin).

   -secgrp   A security group (yes) or a distribution group (no) default=Yes.

   -scope    Domain local (l), global (g), or universal (u) default=g.

   SAMName   Unique SAM account name for this group
             By default, the dn attribute from the GroupDN.

   -memberof Add this new group to other groups.
   -members  Members to add to this new group. 

   -s Server Connect to a remote server/domain, default=%logonserver% domain controller.

   -q        Quiet, suppress all output.

   -uc       Unicode format.
   -uco      Unicode format for output only.
   -uci      Unicode format for input only.

Examples

Add the group 'Beatles' to Active Directory:

C:\> dsadd group cn=Beatles,cn=Musicians,dc=ss64,dc=com

Add the group 'Rolling Stones' to Active Directory:

C:\> dsadd group "cn=Rolling Stones,cn=Musicians,dc=ss64,dc=com"

“If he is a man of honor in one thing, he is that in all things” ~ Raymond Chandler

Related commands

DSAdd - Add object.
DSMod - Modify object. DSMod Group - Add/remove users to a group.
DSGet - Display object. DSGet group - Display group(s) from active directory.
DSMove - Move object.
DSQuery - Search for objects.
DSRM - Delete object.
BuiltIn Groups - Built-In Users and Security Groups.
PowerShell: New-adGroup - Create an AD group.
Equivalent bash commands (Linux): groupadd - Add group.


 
Copyright © 1999-2024 SS64.com
Some rights reserved