DSADD User (installable option either via RSAT /AD DS or adminpack.msi)

Add a user account to active directory.

Syntax
      DSADD User UserDN [-samid SAMName] [-upn UPN] [Options] [-q] [{-uc | -uco | -uci}]

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

   SAMName  Unique SAM account name for this user
            (By default, the first 20 chars from the UserDN/CN)

   UPN      User Principal Name of the user to add, e.g. fred@SS64.com

   -q       Quiet, suppress all output

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

Options:

   [-fn FirstName] [-mi Initial] [-ln LastName] [-display DisplayName]
   [-empid EmployeeID] [-pwd {Password | *}]
   [-desc Description] [-memberof Group ...] [-office Office] [-tel PhoneNumber]
   [-email Email] [-hometel HomePhoneNumber] [-pager PagerNumber]
   [-mobile CellPhoneNumber] [-fax FaxNumber] [-iptel IPPhoneNumber]
   [-webpg WebPage] [-title Title] [-dept Department]
   [-company Company] [-mgr ManagersDistinguishedName]
   [-hmdir HomeDirectory] [-hmdrv DriveLetter:][-profile ProfilePath]
   [-loscr ScriptPath] [-mustchpwd {yes | no}] [-canchpwd {yes | no}]
   [-reversiblepwd {yes | no}] [-pwdneverexpires {yes | no}]
   [-acctexpires NumberOfDays] [-disabled {yes | no}]
   [{-s Server | -d Domain}]
   [-u UserName] [-p {Password | *}]

The special token $username$, may be used to replace the SAM account name in the value of the -email, -hmdir, -profile, and -webpg parameters.

Examples

dsadd user "cn=fred,ou=staff,dc=ss64,dc=com"

dsadd user "cn=JohnS,cn=users,dc=ss64,dc=com" -fn "john" -ln "Smith" -disabled no

“For a list of all the ways technology has failed to improve the quality of life, press three” ~ Alice Kahn

Related:

DSAdd - Add object
DSMod - Modify object
DSGet - Display object
DSMove - Move object
DSQuery - Search for objects
DSRM - Delete object
CSVDE - Import or export AD info in CSV format.
LDIFDE - Edit AD Objects, extend schema, import or export AD information.
PowerShell: New-adUser - Create a new AD user.
Equivalent bash commands (Linux): useradd - Add user


© Copyright SS64.com 1999-2014
Some rights reserved