Use the CSVDE command to import/export AD users in batches

Source: Internet
Author: User

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:// "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 ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.