How to create/export user accounts and groups in bulk using CSVDE

Source: Internet
Author: User
Tags to domain

In daily ad management and maintenance, creating accounts for users is the most common work, but if you want to create hundreds of users and groups, or one day the boss said he wanted to see how many users and groups in the ad, need you to guide a copy of the data, then what? Microsoft has provided us with csvde this tool to complete these operations, the following:

?

    1. Refers to creating a user account

Creating a new Excel table contains at least the following fields, where the userAccountControl value is 514, which means that the initial state of the new account is disabled.

After organizing the Excel table above to save the Users.csv upload to domain control, use the domain administrator to execute the following command to import the user.

Csvde-i-F C:\users.csv

After the import is successful, the account is disabled, save the following command as the reset Password.bat file, run it once, and then select all the accounts to enable it right-click.

?

    1. Bulk export of user information

Csvde-f exportusers.csv-d "ou=test,dc=domainname,dc=com"-R "(& (Objectcategory=person) (Objectclass=user))"

    1. Create groups in batches

      method is similar to creating a user, a new Excel table that contains the following fields, where GroupType is 8, represents a distribution group, and 4 is a security group

      Save the table as Groups.csv upload to domain control and use the domain administrator to import the following command.

      Csvde-i-F C:\groups.csv

      ?

    2. Export group Information

      Use the following command to export all groups.

Csvde-f c:\exportgroups.csv-d "dc=domainname,dc=com"-R "(& (Objectcategory=group) (objectclass=*))"

How to create/export user accounts and groups in bulk using CSVDE

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: info-contact@alibabacloud.com 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.