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 \]
        \[-dept <Department>\] \[-company <Company>\]
        \[\{-s <Server> | -d <Domain>\}\] \[-u <UserName>\]
        \[-p \{<Password> | *\}\] \[-q\] \[\{-uc | -uco | -uci\}\]

Value                   Description
<ContactDN>             Required. Distinguished name (DN) of contact to add.
                        If the target object is omitted, it will be taken
                        from standard input (stdin).
-fn <FirstName>         Sets contact first name to <FirstName>.
-mi <Initial>           Sets contact middle initial to <Initial>.
-ln <LastName>          Sets contact last name to <LastName>.
-display <DisplayName>  Sets contact display name to <DisplayName>.
-desc <Description>     Sets contact description to <Description>.
-office <Office>        Sets contact office location to <Office>.
-tel <Phone#>           Sets contact telephone# to <Phone#>.
-email <Email>          Sets contact e-mail address to <Email>.
-hometel <HomePhone#>   Sets contact home phone# to <HomePhone#>.
-pager <Pager#>         Sets contact pager# to <Pager#>.
-mobile <CellPhone#>    Sets contact mobile# to <CellPhone#>.
-fax <Fax#>             Sets contact fax# to <Fax#>.
-iptel <IPPhone#>       Sets contact IP phone# to <IPPhone#>.
-title <Title>          Sets contact title to <Title>.
-dept <Department>      Sets contact department to <Department>.
-company <Company>      Sets contact company info to <Company>.
\{-s <Server> | -d <Domain>\}
                        -s <Server> connects to the domain controller (DC)
                        with name <Server>.
                        -d <Domain> connects to a DC in domain <Domain>.
                        Default: a DC in the logon domain.
-u <UserName>           Connect as <UserName>. Default: the logged in user.
                        User name can be: user name, domain\user name,
                        or user principal name (UPN).
-p \{<Password> | *\}
                        Password for the user <UserName>. If * is entered
                        then you are prompted for a password.
-q                      Quiet mode: suppress all output to standard output.
\{-uc | -uco | -uci\}     -uc Specifies that input from or output to pipe is
                        formatted in Unicode.
                        -uco Specifies that output to pipe or file is
                        formatted in Unicode.
                        -uci Specifies that input from pipe or file is
                        formatted in Unicode.

If you do not supply a target object at the command prompt, the target
object is obtained from standard input (stdin). Stdin data can be
accepted from the keyboard, 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 Control+Z, for End of File (EOF).

If a value that you supply contains spaces, use quotation marks
around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
See also:
dsadd computer /? - help for adding a computer to the directory.
dsadd contact /? - help for adding a contact to the directory.
dsadd group /? - help for adding a group to the directory.
dsadd ou /? - help for adding an organizational unit to the directory.
dsadd user /? - help for adding a user to the directory.
dsadd quota /? - help for adding a quota to the directory.

Directory Service command-line tools help:
dsadd /? - help for adding objects.
dsget /? - help for displaying objects.
dsmod /? - help for modifying objects.
dsmove /? - help for moving objects.
dsquery /? - help for finding objects matching search criteria.
dsrm /? - help for deleting objects.
dsadd failed:The parameter is incorrect.
type dsadd /? for help.</pre>

<br /><br clear="all" /></p></div>

<fieldset class="fieldgroup group-editors-pick">


<div class="field-syndicate">


<fieldset class="fieldgroup group-publication-info"><legend>Publication Info</legend>

<!-- we don't need $links or associated processing - CL -->
    <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-->
    <script type="text/javascript" src="//"></script>
<!-- SiteCatalyst code version: H.13 Copyright 1997-2009 Omniture, Inc. More info available at -->
<script type="text/javascript" language="JavaScript" src="/sites/all/modules/custom/penton_omniture/s_code.js?r=1.26?V"></script>
<script type="text/javascript" language="JavaScript"><!--
s.pageName="article:JSI Tip 7371 How do I add a contact to Active Directory using the commandline";
s.prop1="JSI Tip 7371 How do I add a contact to Active Directory using the commandline";
s.list1="Windows|Active Directory|Systems Management|Home Technology|Home Theater|JSIFAQ|Tips";
s.prop10="Oct 26, 2003";
s.prop37="Windows IT Pro";
s.eVar9="Jerold Schulman";
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code)//--></script>
<script language="JavaScript" type="text/javascript"><!--
//--></script><noscript><a href="" title="Web Analytics"><img src=""
height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->
<!-- End SiteCatalyst code version: H.13 -->

<div id="user_relationships_popup_form" class="user_relationships_ui_popup_form"></div>
<img src="" style="position: absolute;width:1px;height:1px;left:-9999px;"/>

<iframe id="DivShim" src="/sites/all/modules/custom/pm_doubleclick/blankIframe.html" scrolling="no" frameborder="0" style="height: 0;"></iframe>
<div id="roadblockbackground" style="height: 0;"></div>
<div id="roadblockcontainer" class="ad640x480 transparent" style="height: 0; overflow: hidden;">
  <div id="roadblock">
    <p id="closeRB" class="close">Sponsored Introduction <span id="showCount"><a href="javascript:void(0);" onclick="clickAndHide();return false;">Continue on to <span id="roadblockSiteName"></span></a> (or wait <span id="rc"></span> seconds) <a class="xButton" href="#">×</a></span></p>
    <div id="gpt-interstitial" class="introstitialAd
      <script type="text/javascript">
      var cookieEnabled = (navigator.cookieEnabled) ? true : false;
      if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
        document.cookie = "testcookie"
        cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;
      if (cookieEnabled != null) {
        if (cookieEnabled) {
          function setCookie(name, value, expires, path, domain, secure) {
            var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
            document.cookie = curCookie;
          var one_day = 1000 * 60 * 60 * roadblock.roadblockdisplay,
              nextday = 0,
              index = document.cookie.indexOf('intro');
          if (one_day != 0) {
              nextday = new Date();
              nextday.setTime(nextday.getTime() + one_day);
          if (index == -1) {
            setCookie('intro', 1, nextday, '/');
            $('#gpt-' + roadblock.roadblockposition).addClass('processed');
<div id="gpt-pm-oop"><script type="text/javascript">googletag.display('gpt-pm-oop');</script></div><script type="text/javascript" src="/sites/all/modules/contrib/swftools/onepixelout/onepixelout.js?V"></script>
<script type="text/javascript" src="/sites/all/modules/custom/pm_doubleclick/navigation-ads.js?V"></script>
<script type="text/javascript">
jQuery.extend(Drupal.settings, {"chartbeat":{"uid":53678,"domain":"","useCanonical":true,"noCookies":false,"sections":"Windows,Active Directory,Systems Management","title":"JSI Tip 7371. How do I add a contact to Active Directory using the command-line?"}});
<script type="text/javascript">
_bizo_data_partner_id = 594;
<script type="text/javascript">
(function() { var s = document.getElementsByTagName("script")[0];var b = document.createElement("script");b.type = "text/javascript";b.async = true;b.src = (window.location.protocol === "https:" ? "https://sjs" : "http://js") + "";s.parentNode.insertBefore(b, s);})();
<script type="text/javascript">
adroll_adv_id = "VLH7HVC6ZNEIDEKM72ATRL"; adroll_pix_id = "2ITXTLLMW5EXHKWNE3UNNJ"; (function () {var _onload = function(){if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return}if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return}var scr = document.createElement("script");var host = (("https:" == document.location.protocol) ? "" : "");scr.setAttribute('async', 'true');scr.type = "text/javascript";scr.src = host + "/j/roundtrip.js";((document.getElementsByTagName('head') || [null])[0] || document.getElementsByTagName('script')[0].parentNode).appendChild(scr);};if (window.addEventListener) {window.addEventListener('load', _onload, false);}else {window.attachEvent('onload', _onload)}}());
<script type="text/javascript">
  var _sf_async_config=Drupal.settings.chartbeat;
    function loadChartbeat() {
      window._sf_endpt=(new Date()).getTime();
      var e = document.createElement('script');
      e.setAttribute('language', 'javascript');
      e.setAttribute('type', 'text/javascript');
      e.setAttribute('src', '//');
    var oldonload = window.onload;
    window.onload = (typeof window.onload != 'function') ?
       loadChartbeat : function() { oldonload(); loadChartbeat(); };