DSADD User (Windows XP/2003/2008)

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 | *}]

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 commands:
dsadd - Add other objects
dsmod - modify object
dsget - display object
dsmove - move object
dsquery - find object
dsrm - delete object
CSVDE - Import or export AD info in CSV format.
LDIFDE - Edit AD Objects, extend schema, import or export AD information.
Equivalent bash commands (Linux): ldapmodify - Modify Lightweight Directory Access Protocol



Back to the Top

Simon Sheppard
SS64.com