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="http://windowsitpro.com/windows/jsi-tip-7371-how-do-i-add-contact-active-directory-using-command-line">http://windowsitpro.com/windows/jsi-tip-7371-how-do-i-add-contact-active-directory-using-command-line</a></div> <!-- <div class="print-links"></div> links unnecessary in print--> <script type="text/javascript" src="//api.demandbase.com/api/v2/ip.json?token=b155ec5d50b5dcb41662f36b4d10a6f7702c87e6&callback=dbase_parse"></script> <!-- SiteCatalyst code version: H.13 Copyright 1997-2009 Omniture, Inc. More info available at http://www.omniture.com --> <script type="text/javascript" language="JavaScript" src="/sites/all/modules/custom/penton_omniture/s_code.js?r=1.26?k"></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.pageType="article"; s.prop1="JSI Tip 7371 How do I add a contact to Active Directory using the commandline"; s.prop6="article"; s.list1="Windows|Active Directory|Systems Management|Home Technology|Home Theater|JSIFAQ|Tips"; s.prop10="Oct 26, 2003"; s.prop12="p"; s.prop37="Windows IT Pro"; s.prop41="author"; s.eVar9="Jerold Schulman"; s.eVar72="89c6c72d-d14c-43b5-9306-ad718162e44f"; /************* 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"><!-- if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-') //--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="http://metrics.pisces-penton.com/b/ss/pentondev/1/H.21--NS/0/3866178/8993203" 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="http://d.adroll.com/ipixel/IXZC4QKE6BDSVNBBOX54JQ/3BQ2N447KNEODAIZTDTY2B?ar_ed_visitor=corporate" 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"> <!--//--><![CDATA[//><!-- 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 = new Date(), index = document.cookie.indexOf('intro'); nextday.setTime(nextday.getTime() + one_day); if (index == -1) { setCookie('intro', 1, nextday, '/'); $('#gpt-' + roadblock.roadblockposition).addClass('processed'); googletag.display('gpt-interstitial'); } } } //--><!]]> </script> </div> </div> </div> <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?k"></script> <script type="text/javascript" src="/sites/all/modules/custom/pm_doubleclick/navigation-ads.js?k"></script> <script type="text/javascript"> <!--//--><![CDATA[//><!-- jQuery.extend(Drupal.settings, {"chartbeat":{"uid":53678,"domain":"windowsitpro.com","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> <script type="text/javascript"> <!--//--><![CDATA[//><!-- _bizo_data_partner_id = 594; //--><!]]> </script> <script type="text/javascript"> <!--//--><![CDATA[//><!-- (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") + ".bizographics.com/insight.min.js";s.parentNode.insertBefore(b, s);})(); //--><!]]> </script> <script type="text/javascript"> <!--//--><![CDATA[//><!-- 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) ? "https://s.adroll.com" : "http://a.adroll.com");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> <script type="text/javascript"> <!--//--><![CDATA[//><!-- var _sf_async_config=Drupal.settings.chartbeat; (function(){ 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', '//static.chartbeat.com/js/chartbeat.js'); document.body.appendChild(e); } var oldonload = window.onload; window.onload = (typeof window.onload != 'function') ? loadChartbeat : function() { oldonload(); loadChartbeat(); }; })(); //--><!]]> </script> </body> </html>