Use the CSVDE command to import/export AD users in batches
You can use the CSVDE command to import/export CSV files with user information to/from AD in batches. The basic syntax command for import is as follows:
Csvde-I-f c: \ filename.csv-k
Run the following command to view the specific parameters:
Csvde /?
First, set user information in Excel and save the file as csv format.
Run the import command in cmd.
As you can see, the import is successful. View in AD:
We can see two new users, but they are different from the other three, with a downward arrow. This is because the CSVDE command cannot import passwords, so the imported users are disabled. Next, we will batch Set passwords, enable accounts, and set passwords to never expire. Use the following command: (refer to http://technet.micrZ connector? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> placement =" brush: java; "> dsquery user" ou = T0500 _ customer, ou = T0000 _ test Internet users, ou = XXX, dc = XXX, dc = com "| dsmod user-pwd 123 @ abc-pwdneverexpires yes-disabled no use the following command to export AD information:
Csvde-f E: \ 20131015.csv-r "(objectClass = user)"-d "OU = XXX, DC = XXX, DC = com"-u
OU is processed here. You should replace it with your own attribute value when using it. This command exports the AD user to the E disk. I use the current date as the file name and save it as a csv file (the csv file can be opened in Excel ).