Using the DSADD CONTACT command, you can add a contact from the command-line.

When you type dsadd contact /?, the parameters are displayed:

Description:  Adds a contact to the directory.
Syntax:  dsadd contact \[-fn \] \[-mi \]
        \[-ln \] \[-display \] \[-desc \]
        \[-office \] \[-tel \] \[-email \]
        \[-hometel \] \[-pager \] \[-mobile \]
        \[-fax \] \[-iptel \] \[-title \]<br />         \[-dept <Department>\] \[-company <Company>\]<br />         \[\{-s <Server> | -d <Domain>\}\] \[-u <UserName>\]<br />         \[-p \{<Password> | *\}\] \[-q\] \[\{-uc | -uco | -uci\}\]<br /> Parameters:<br /> <br /> Value                   Description<br /> <ContactDN>             Required. Distinguished name (DN) of contact to add.<br />                         If the target object is omitted, it will be taken<br />                         from standard input (stdin).<br /> -fn <FirstName>         Sets contact first name to <FirstName>.<br /> -mi <Initial>           Sets contact middle initial to <Initial>.<br /> -ln <LastName>          Sets contact last name to <LastName>.<br /> -display <DisplayName>  Sets contact display name to <DisplayName>.<br /> -desc <Description>     Sets contact description to <Description>.<br /> -office <Office>        Sets contact office location to <Office>.<br /> -tel <Phone#>           Sets contact telephone# to <Phone#>.<br /> -email <Email>          Sets contact e-mail address to <Email>.<br /> -hometel <HomePhone#>   Sets contact home phone# to <HomePhone#>.<br /> -pager <Pager#>         Sets contact pager# to <Pager#>.<br /> -mobile <CellPhone#>    Sets contact mobile# to <CellPhone#>.<br /> -fax <Fax#>             Sets contact fax# to <Fax#>.<br /> -iptel <IPPhone#>       Sets contact IP phone# to <IPPhone#>.<br /> -title <Title>          Sets contact title to <Title>.<br /> -dept <Department>      Sets contact department to <Department>.<br /> -company <Company>      Sets contact company info to <Company>.<br /> \{-s <Server> | -d <Domain>\}<br />                         -s <Server> connects to the domain controller (DC)<br />                         with name <Server>.<br />                         -d <Domain> connects to a DC in domain <Domain>.<br />                         Default: a DC in the logon domain.<br /> -u <UserName>           Connect as <UserName>. Default: the logged in user.<br />                         User name can be: user name, domain\user name,<br />                         or user principal name (UPN).<br /> -p \{<Password> | *\}<br />                         Password for the user <UserName>. If * is entered<br />                         then you are prompted for a password.<br /> -q                      Quiet mode: suppress all output to standard output.<br /> \{-uc | -uco | -uci\}     -uc Specifies that input from or output to pipe is<br />                         formatted in Unicode.<br />                         -uco Specifies that output to pipe or file is<br />                         formatted in Unicode.<br />                         -uci Specifies that input from pipe or file is<br />                         formatted in Unicode.<br /> <br /> Remarks:<br /> If you do not supply a target object at the command prompt, the target<br /> object is obtained from standard input (stdin). Stdin data can be<br /> accepted from the keyboard, a redirected file, or as piped output from<br /> another command. To mark the end of stdin data from the keyboard or<br /> in a redirected file, use Control+Z, for End of File (EOF).<br /> <br /> If a value that you supply contains spaces, use quotation marks<br /> around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").<br /> See also:<br /> dsadd computer /? - help for adding a computer to the directory.<br /> dsadd contact /? - help for adding a contact to the directory.<br /> dsadd group /? - help for adding a group to the directory.<br /> dsadd ou /? - help for adding an organizational unit to the directory.<br /> dsadd user /? - help for adding a user to the directory.<br /> dsadd quota /? - help for adding a quota to the directory.<br /> <br /> Directory Service command-line tools help:<br /> dsadd /? - help for adding objects.<br /> dsget /? - help for displaying objects.<br /> dsmod /? - help for modifying objects.<br /> dsmove /? - help for moving objects.<br /> dsquery /? - help for finding objects matching search criteria.<br /> dsrm /? - help for deleting objects.<br /> dsadd failed:The parameter is incorrect.<br /> type dsadd /? for help.</div></div> <p> <br /><br clear="all" /></p></div> <fieldset class="fieldgroup group-editors-pick"> </fieldset> <div class="field-syndicate"> Syndicate </div> <fieldset class="fieldgroup group-publication-info"><legend>Publication Info</legend> </fieldset> </div> <!-- we don't need $links or associated processing - CL --> </div> </div> <div class="print-footer"></div> <hr class="print-hr" /> <div class="print-source_url"><strong>Source URL:</strong> <a href=""></a></div> <!-- <div class="print-links"></div> links unnecessary in print--> </body> </html>