Create User (Perl)

This code can be found in Chapter 20 of Active Directory, 3rd Edition

Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.

Find out how to download all of the Perl code from this site.

# From the book "Active Directory, Third Edition" 
# ISBN: 0-596-10173-2

$objUser1 = $objSalesOU->Create('user', 'cn=Sue Peace');
$objUser1->Put('sAMAccountName', 'SueP');
$objUser1->SetInfo();

$objUser2 = $objSalesOU->Create('user', 'cn=Keith Cooper');
$objUser2->Put('sAMAccountName', 'KeithC');
$objUser2->SetInfo();

This code has been viewed 1310 times.

New from the creators of TechTasks.com: StatSheet.com