Home > Commands A-M > Commands Ds-Dz

DSADD


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Adds specific types of objects to the directory.


Syntax

DSADD {computer | contact | group | ou | quota | user} /?

DSADD computer computer_dn [-desc description] [-loc location] [-memberof group_dn ...] [-p {password | *}] [-q] [{-s server | -d domain}] [-samid sam_name] [-u user_name] [-uc | -uci | -uco]

DSADD contact contact_dn [-company company_name] [-dept department] [-desc description] [-display display_name] [-email email] [-fax fax_number] [-fn first_name] [-hometel home_phone_number] [-iptel ip_phone_number] [-ln last_name] [-mi middle_initial] [-mobile cell_phone_number] [-office office] [-p {password | *}] [-pager pager_number] [-q] [{-s server | -d domain}] [-tel phone_number] [-title title] [-u user_name] [-uc | -uci | -uco]

DSADD group group_dn [-desc description] [-memberof group_dn ...] [-members member ...] [-p {password | *}] [-q] [{-s server | -d domain}] [-samid sam_name] [-scope {g | l | u}] [-secgrp {yes | no}] [-u user_name] [-uc | -uci | -uco]

DSADD ou organizational_unit_dn [-desc description] [-p {password | *}] [-q] [{-s server | -d domain}] [-u user_name] [-uc | -uci | -uco]

DSADD quota -acct name [-desc description] [-p {password | *}] -part partition_dn [-q] -qlimit value [-rdn relative_distinguished_name] [{-s server | -d domain}] [-u user_name] [-uc | -uci | -uco]

DSADD user user_dn -samid sam_name [-acctexpires number_of_days] [-canchpwd {yes | no}] [-company company_name] [-dept department] [-desc description] [-disabled {yes | no}] [-display display_name] [-email email] [-empid employee_id] [-fax fax_number] [-fn first_name] [-hmdir home_directory] [-hmdrv home_drive_letter] [-hometel home_phone_number] [-iptel ip_phone_number] [-loscr script_path] [-ln last_name] [-mi middle_initial] [-memberof group_dn ...] [-mgr manager] [-mobile cell_phone_number] [-mustchpwd {yes | no}] [-office office] [-p {password | *}] [-pager pager_number] [-profile profile_path] [-pwd {Password | *}] [-pwdneverexpires {yes | no}] [-q] [-reversiblepwd {yes | no}] [{-s server | -d domain}] [-tel phone_number] [-title title] [-u user_name] [-uc | -uci | -uco] [-upn upn] [-webpg web_page]


Parameters
computer (NTXP)
Adds a single computer to the directory.
computer_dn (NTXP)
Specifies the distinguished name of the computer you want to add.
contact (NTXP)
Adds a single contact to the directory.
contact_dn (NTXP)
Specifies the distinguished name of the contact you want to add.
group (NTXP)
Adds a single group to the directory.
group_dn (NTXP)
Specifies the distinguished name of the group you want to add.
ou (NTXP)
Adds a single organizational unit to the directory.
organizational_unit_dn (NTXP)
Specifies the distinguished name of the organizational unit you want to add.
quota (NT2003)
Adds a quota specification to a directory partition.
user (NTXP)
Adds a single user to the directory.
user_dn (NTXP)
Specifies the distinguished name of the user you want to add.

Switches
/? (NTXP)
Display help.
-acct name (NT2003)
Specifies the security principal (user, group, computer, or InetOrgPerson) to whom the quota specification applies. You can use for name:
-acctexpires number_of_days (NTXP)
Specifies the number of days from today that the user account will expire. A value of 0 sets expiration at the end of today. A positive value sets expiration in the future. A negative value sets expiration in the past. The value NEVER sets the account to never expire.
-canchpwd {yes | no} (NTXP)
Specifies if users can change their passwords at all (yes) or not (no). By default, yes. The value must be yes if -mustchpwd is yes.
-company company (NTXP)
Specifies the company information for the contact/user you want to add.
-d domain (NTXP)
Connects the computer to a specified domain. By default, the computer is connected to the domain controller in the logon domain.
-dept department (NTXP)
Specifies the department of the contact/user you want to add.
-desc description (NTXP)
Specifies the description of the computer/contact/group/organizational unit/user you want to add.
-disabled {yes | no} (NTXP)
Specifies if the user account is disabled for log on (yes) or not (no). By default, no.
-display display_name (NTXP)
Specifies the display name of the contact/user you want to add.
-email email (NTXP)
Specifies the e-mail address of the contact/user you want to add.
-empid employee_id (NTXP)
Specifies the employee ID of the user you want to add.
-fax fax_number (NTXP)
Specifies the fax number of the contact/user you want to add.
-fn first_name (NTXP)
Specifies the first name of the contact/user you want to add.
-hmdir home_directory (NTXP)
Specifies the home directory location of the user you want to add. If home_directory is given as a universal naming convention (UNC) path, then you must specify a drive letter to be mapped to this path using -hmdrv.
-hmdrv home_drive_letter (NTXP)
Specifies the home directory drive letter of the user you want to add.
-hometel home_phone_number (NTXP)
Specifies the home telephone number of the contact/user you want to add.
-iptel ip_phone_number (NTXP)
Specifies the IP phone number of the contact/user you want to add.
-ln last_name (NTXP)
Specifies the last name of the contact/user you want to add.
-loc location (NTXP)
Specifies the location of the computer you want to add.
-loscr script_path (NTXP)
Specifies the logon script path of the user you want to add.
-memberof group_dn ... (NTXP)
Specifies the groups in which you want the computer/group/user as a member.
-members member ... (NTXP)
Specifies the members to add to the new group.
-mgr manager_dn (NTXP)
Specifies the distinguished name of the manager of the user you want to add.
-mi middle_initial (NTXP)
Specifies the middle initial of the contact/user you want to add.
-mobile cell_phone_number (NTXP)
Specifies the mobile phone number of the contact/user you want to add.
-mustchpwd {yes | no} (NTXP)
Specifies if users must change their passwords at the time of next logon (yes) or not (no). By default, no.
-office office (NTXP)
Specifies the office location of the contact/user you want to add.
-p {password | *} (NTXP)
Specifies to use either a password or a * to log on to a remote server. If *, then prompted for password.
-pager pager_number (NTXP)
Specifies the pager number of the contact/user you want to add.
-part partition_dn (NT2003)
Specifies the distinguished name of the directory partition on which you want to create a quota. If you do not specify the partition_dn it is taken from standard input (stdin).
-profile profile_path (NTXP)
Specifies the profile path of the user you want to add.
-pwd {password | *} (NTXP)
Specifies password or a * user password. If *, then prompts for password.
-pwdneverexpires {yes | no} (NTXP)
Specifies if the user password never expires (yes) or not (no). By default, no.
-q (NTXP)
Suppresses all output to standard output (quiet mode).
-qlimit value (NT2003)
Specifies the number of objects within the directory partition that can be owned by the security principal. Use -1 for unlimited quota.
-rdn relative_distinguished_name (NT2003)
Specifies the relative distinguished name of the quota specification being created. If you do not specify, it is set to Domain\SAMaccountname, using the domain and account name of the security principal specified by the -acct switch.
-reversiblepwd {yes | no} (NTXP)
Specifies if the user password should be stored using reversible encryption (yes) or not (no). By default, no.
-s server (NTXP)
Connects the computer to a specified server.
-samid sam_name (NTXP)
Specifies to use the SAM name as the unique SAM account name for this computer/group/user. If omitted, then a SAM account name is derived from the value of the common name attribute used in computer_dn.
-scope {g | l | u} (NTXP)
Specifies whether the scope of the group you want to add is domain global(g), local (l), or universal (u). If the domain is in mixed-mode, then the universal scope is not supported. Defaults to global.
-secgrp {yes | no} (NTXP)
Specifies whether the group you want to add is a security group (yes), the default, or a distribution group (no).
-tel phone_number (NTXP)
Specifies the telephone number of the contact/user you want to add.
-title title (NTXP)
Specifies the title of the contact/user you want to add.
-u user_name (NTXP)
Specifies the user name with which user will log on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the formats:
      user name
      domain\user name
      user principal name (UPN)
-uc | -uci | -uco (NT2003)
Specifies that output or input data is formatted in Unicode:
-upn upn (NTXP)
Specifies the user principal name of the user you want to add.
-wegpg web_page (NTXP)
Specifies the Web page URL of the user you want to add.

Related

none.


Notes

none.


Examples

none.


Errorlevels

none.


Availability
External
DOS
none
Windows
none
Windows NT
NTXP NT2003

Last Updated: 2003/07/28
Direct corrections or suggestions to: Rick Lively