0% found this document useful (0 votes)
2 views

UD09_3A_docs.microsoft.com-Dsadd_Computer

The document provides instructions on using the dsadd command-line tool to add a single computer to Active Directory in Windows Server 2008 and later. It details the syntax, parameters, and examples for effectively executing the command. Users must run dsadd from an elevated command prompt and can specify various attributes such as the computer's distinguished name, SAM account name, and group memberships.

Uploaded by

dimela3589
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

UD09_3A_docs.microsoft.com-Dsadd_Computer

The document provides instructions on using the dsadd command-line tool to add a single computer to Active Directory in Windows Server 2008 and later. It details the syntax, parameters, and examples for effectively executing the command. Users must run dsadd from an elevated command prompt and can specify various attributes such as the computer's distinguished name, SAM account name, and group memberships.

Uploaded by

dimela3589
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Dsadd computer

docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-
2012/cc754539(v=ws.11)

08/31/2016

Applies To: Windows Server 2008, Windows Server 2012, Windows 8

Adds a single computer to the directory.

Dsadd is a command-line tool that is built into Windows Server 2008. It is available if you
have the Active Directory Domain Services (AD DS) or Active Directory Lightweight
Directory Services (AD LDS) server role installed. To use dsadd, you must run the dsadd
command from an elevated command prompt. To open an elevated command prompt,
click Start, right-click Command Prompt, and then click Run as administrator.

For examples of how to use this command, see Examples.

Syntax

dsadd computer <ComputerDN> [-samid <SAMName>] [-desc <Description>] [-loc


<Location>] [-memberof <GroupDN ...>] [{-s <Server> | -d <Domain>}] [-u
<UserName>] [-p {<Password> | *}] [-q] [{-uc | -uco | -uci}]

Parameters

Parameter Description

<ComputerDN> Required. Specifies the distinguished name of the computer that you
want to add. If you omit the distinguished name, dsadd takes the
name from standard input (stdin).

-samid Specifies to use the Security Accounts Manager (SAM) name as the
<SAMName> unique SAM account name for this computer, for example,
TESTPC2$. If you do not specify this parameter, then dsadd derives
a SAM account name from the value of the common name attribute
in ComputerDN.

-desc Specifies the description of the computer that you want to add.
<Description>

-loc <Location> Specifies the location of the computer that you want to add.

1/3
Parameter Description

-memberof Specifies the groups of which you want the computer to be a


<GroupDN> member.

{-s <Server> | - Connects the computer to a server or domain that you specify. By
d <Domain>} default, dsadd connects the computer to the domain controller in the
logon domain.

-u Specifies the user name with which the user logs on to a remote
<UserName> server. By default, -u uses the user name with which the user logged
on. You can use any of the following formats to specify a user name:

user name (for example, Linda)

domain\user name (for example, widgets\Linda)

user principal name (UPN) (for example,


[email protected])

-p Specifies to use either a password or an asterisk (*) to log on to a


{<Password>| remote server. If you type *, dsadd prompts you for a password.
*}

-q Suppresses all output to standard output (quiet mode).

{-uc | -uco | - Specifies that dsadd formats output or input data in Unicode. The
uci} following list explains each format.

-uc: Specifies a Unicode format for input from or output to a


pipe (|).

-uco : Specifies a Unicode format for output to a pipe (|) or a


file.

-uci: Specifies a Unicode format for input from a pipe (|) or a


file.

/? Displays help at the command prompt.

Remarks
If you do not supply a target object at the command prompt, dsadd obtains the
target object from standard input (stdin). Dsadd can accept stdin from the keyboard,
from a redirected file, or as piped output from another command. To mark the end of
stdin data from the keyboard or in a redirected file, use the end-of-file character
(CTRL+Z).

2/3
If a value that you supply contains spaces, use quotation marks around the text, for
example, "CN=DC 2,OU=Domain Controllers,DC=Contoso,DC=Com".

If you supply multiple values for a parameter, use spaces to separate the values, for
example, a list of distinguished names.

Examples
To create a computer account named client01 in the default Computers container of
northwindtraders.com, type:

dsadd computer cn=client01,cn=computers,dc=northwindtraders,dc=com

3/3

You might also like