When your working with virtual machines, you often need to quickly configure and setup a domain, and populate it with computers, users etc.
DsAdd is a great little tool that came with Windows 2003 it should live in your System32 directory, and be available on the command line without the need for any path mambo.
Specifically I like using the dsadd user
Example
dsadd user "cn=Test User,ou=Test OU,dc=mycompany,dc=local" -samid testuser -upn testuser@mycompany.com -display "Test User" -pwd SecretPassword -disabled no -canchpwd no -pwdneverexpires yes
Wrapping that in some Perl or Ruby scripts, (or nUnit, or PowerShell), and your good to go.
Usage:
“dsadd user UserDN [-samid SAMName] [-upn UPN] [-fn FirstName] [-mi Initial] [-ln LastName] [-display DisplayName] [-empid EmployeeID] [-pwd {Password | *}] [-desc Description] [-memberof Group ...] [-office Office] [-tel PhoneNumber] [-email Email] [-hometel HomePhoneNumber] [-pager PagerNumber] [-mobile CellPhoneNumber] [-fax FaxNumber] [-iptel IPPhoneNumber] [-webpg WebPage] [-title Title] [-dept Department] [-company Company] [-mgr Manager] [-hmdir HomeDirectory] [-hmdrv DriveLetter:][-profile ProfilePath] [-loscr ScriptPath] [-mustchpwd {yes | no}] [-canchpwd {yes | no}] [-reversiblepwd {yes | no}] [-pwdneverexpires {yes | no}] [-acctexpires NumberOfDays] [-disabled {yes | no}] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-q] [{-uc | -uco | -uci}]”