Once the domain deployment is complete, it is often the case that large-scale domain users are added, and bulk additions are more efficient.
This provides a batch of batches to implement batch processing functions.
First build useradd.cmd and list.txt two files
Edit the Useradd.cmd file with the following content:
@echo onc:for/f%%i in (list.txt) do dsadd user "cn=%%i,ou= sales department, ou= sales, ou=renren,dc=renren,dc=com"-display%%i-ln%%i -UPN%%[email protected]-samid%%i-pwd asd123-pwdneverexpires yes-company renrenpauseexit
The CN section can modify the corresponding OU according to the actual situation, either as a level OU or as a sub-OU.
3. The names of the people written in the List.txt are all spelled out, with each user occupying one line, such as:
650) this.width=650; "style=" width:542px;height:215px; "title=" 2.jpg "alt=" Wkiom1wjhxxccwpeaadydwla_ya038.jpg "src= "Http://s3.51cto.com/wyfs02/M00/6E/D4/wKiom1WJHXXCcWPEAADyDwla_yA038.jpg" width= "532" height= "251"/>
4. Right-click Useradd.cmd to run as administrator to successfully add domain users in bulk.
This article is from the "Stenning Technology blog" blog, make sure to keep this source http://magic3.blog.51cto.com/1146917/1664658
How to increase domain users in bulk