My personal skills are limited. I hope you will not laugh.
First, the reason is explained. The company upgraded the Domain Server to win2008R2. After the installation, it entered more than 300 user accounts, and its head suddenly increased ~ To add users in batches.
I did not find a good method on the Internet for a long time. Finally, I used the idea of csvde import.
First of all, the csvde command is available for running and installing the domain in cmd. Let's take a look at the help.
Based on your big comments on the Internet, please refer to the instructions in http://www.bkjia.com/net/201110/410169.htmlto complete xubenxin.
The format of user.txt is:
Dn, objectclass, samaccountname, userprincipalname, displayname, useraccountcontrol
"Cn = zhangsan, ou = test, dc = qqwwee, dc = com", user, zhangsan, zhangsan@qqwwee.com, Zhang San
..........
The project organization sequence of the pipeline is different from that of mine. I don't know if it is because the system version is different.
In addition, the following section describes how to extract account information from user.txt. First, you need an EXCEL employee list that contains name, email, department, and other information.
Open this excelfile, and sort the versions according to the format in user.txt. The information can be extracted in the middle.
I extracted the email username first because it can be used as an account.
Assume that the email data is in A1.
Enter
= MID (A1, 1, FIND ("@", A1, 1)-1)
Check whether the account name has been mentioned? Now, drag it from top to bottom.
Then, replace the account information zhangsan in "cn = zhangsan, ou = test, dc = qqwwee, dc = com" with the corresponding user name.
Now, assume that we want to replace the text AAA with the information in B1,
= SUBSTITUTE (A $1, "AAA", B1)
Drag from top to bottom again
OK, I have achieved the desired effect. Just save it as CSV and copy the account information directly to the text. Use the command csvde-I-f c: \ user.txt to import the account in batches.
After the import is complete, the password is changed. Run the command dsquery user dc = qqwwee, dc = com-limit 0 | dsmod user-pwd Abc123 to change the password.
My Reference URL is an explanation of the meaning of commands in the http://social.microsoft.com/Forums/nl-NL/windowsserversystemzhchs/thread/63ae3345-bcf6-4d96-9fe8-06756eaddc67
This article is from "Learning ~ Learning? Learning !" Blog