- It is likely helpful to have an import ID (student ID, employee ID, etc) to match with other data later.
- Create a column for SAMAccount (concatenate existing columns).
- Create a column for email address (concatenate SAMAccount with desired email suffix).
- Remove unecessary columns.
Consider some examples of inputs that would be invalid or potentially undesirable for an email address:
Nick Name | Last Name | Reason | |
---|---|---|---|
Connor | O'Brien | ConnorO'[email protected] | Apostrophe |
Axel | Garcia-Soto | [email protected] | Hyphen |
Aaron | De La Cruz Benavides | AaronDe La Cruz [email protected] | Spaces |
SAMSON | BRADDOCK | [email protected] | Capitalization |
T.O. | Redmond | [email protected] | Periods |
Here are some potential fixes:
- Use find and replace to search for and replace hyphens, apostrophes, and spaces with nothing.
- Manually fix capitalization.
Nick Name | Last Name | Fix | |
---|---|---|---|
Connor | OBrien | [email protected] | Delete apostrophe |
Axel | GarciaSoto | [email protected] | Delete hyphen |
Aaron | DeLaCruzBenavides | [email protected] | Delete spaces |
Samson | Braddock | [email protected] | Fix capitalization |
TO | Redmond | [email protected] | Delete periods |
Download and extract the zip file:
https://github.com/JamesWClark/ADHelper/blob/main/Release/ADHelper.zip?raw=true
Export your data to CSV format, placing it in the same folder as the above zip.
Run with the following tasks: creat_users
or set_passwords
./ADHelper.exe -csv users.csv -xml config.xml -task create_users
./ADHelper.exe -csv users.csv -xml config.xml -task set_passwords
The XML config looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<domain>student.rockhurst.int</domain>
<distinguishedName>OU=2026,OU=Highly Managed,OU=Users,OU=Student.Greenlease,DC=student,DC=rockhurst,DC=int</distinguishedName>
<csv>
<headers>true</headers>
</csv>
<password>
<generator>true</generator>
</password>
</configuration>
Some info about each field follows...
domain
- the active directory domain we are connecting todistinguishedName
- the name of the active directory org unit where users are to be createdcsv/headers
- true if the csv file has headers, false otherwisepassword/generator - will create new passwords if set to
true, set to
false` if you want to use passwords from the csv file