Create bulk users in Microsoft Active Directory
To create bulk users in Microsoft Active Directory, you can use the csvde
command-line utility. This utility allows you to import and export data from Active Directory in CSV (Comma Separated Value) format.
Here is an example of how to use csvde
to create bulk users in Active Directory:
- First, create a CSV file containing the data for the users you want to create. The file should have a header row with the attribute names, followed by the data for each user on a separate row. For example:
Copy code
DN,objectClass,sAMAccountName,givenName,sn,userPrincipalName,displayName
CN=John Doe,user,johndoe,John,Doe,johndoe@domain.com,John Doe
CN=Jane Doe,user,janedoe,Jane,Doe,janedoe@domain.com,Jane Doe
Save the CSV file and open a command prompt or PowerShell window.
Use the csvde
command to import the data from the CSV file into Active Directory. For example:
Copy code
csvde -i -f users.csv -k
This command will create the users specified in the CSV file, using the attributes and values provided.
Note: The -k
option is used to ignore any errors and continue importing the data. You can omit this option if you want csvde
to stop on any errors.
For more information and additional options, you can run csvde /?
to see the full list of available options for the csvde
utility. You can also refer to the official Microsoft documentation for more details.