Http://bbs.51cto.com/thread-1315948-1.html
mentioned in the previous articlecsvdeBulk AddUser,ou,group, but withcsvdeThere are several drawbacks in which you cannot add a user password or set a user as a non-deleted object.
The following describes the use of powerfulPowerShellHow to do the same thing conveniently.
650) this.width=650; "src=" http://bbs.51cto.com/images/default/attachimg.gif "border=" 0 "style=" margin:0px; Padding:0px;border:medium none;line-height:1.6em; "alt=" Attachimg.gif "/>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/7A/CC/wKioL1a5SLHjvacaAABNNVqKOXU522.png "border=" 0 " Style= "Margin:0px;padding:0px;border:medium none;line-height:22.4px;font-family: ' Song Body ', Arial, Helvetica, ' San-serif '; Font-size:14px;white-space:normal;background-color:rgb (255,255,255); "/>
after testing, Notepad must beUnicodemode, it seems unable to use. csvImport, I tested a few times, but this is the most convenient. But it's not easy to useExceledited, I do not know whether someone to solve.
as a rule, first importOU.
Out.txtThe information inside is simple. Here'sPathThat was mentioned in the last article.DN.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7A/CC/wKioL1a5SLGgF-sPAAAppFTO1zk232.png "border=" 0 " Style= "Margin:0px;padding:0px;border:medium none;line-height:22.4px;font-family: ' Song Body ', Arial, Helvetica, ' San-serif '; Font-size:14px;white-space:normal;background-color:rgb (255,255,255); "/>
Ou.ps1the commands inside are as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/7A/CC/wKioL1a5SLHT50u4AABGPIikX9I478.png "border=" 0 " Width= "720" style= "Margin:0px;padding:0px;border:medium none;line-height:22.4px;font-family: ' Song Body ', Arial, Helvetica , ' San-serif '; Font-size:14px;white-space:normal;background-color:rgb (255,255,255);/>
import is meant to beOu.txt, loop through each line, create a new organizational unit, and the content fromtxtwithin each row, and added to prevent accidental deletion of object properties;
Build WellOubuiltUser
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/7A/CC/wKiom1a5SFmC73GKAACjRidbCGI598.png "border=" 0 " Width= "720" style= "Margin:0px;padding:0px;border:medium none;line-height:22.4px;font-family: ' Song Body ', Arial, Helvetica , ' San-serif '; Font-size:14px;white-space:normal;background-color:rgb (255,255,255);/>
The first one is an example, do not fill each, generally write to the department over there.
User.ps1the contents are as follows
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7A/CC/wKiom1a5SFmDfRg8AACovBR6ffA044.png "border=" 0 " Width= "720" style= "Margin:0px;padding:0px;border:medium none;line-height:22.4px;font-family: ' Song Body ', Arial, Helvetica , ' San-serif '; Font-size:14px;white-space:normal;background-color:rgb (255,255,255);/>
the preceding are some properties that are not table.
Section5Line of-accountpasswordindicates that the set account password is notCisco1988,-changepasswordlogonindicates login change password,-enableindicates the account is enabled.
the last line indicates that all accounts are set to prevent accidental deletion of attributes.
UserThe building is completed .Group
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/7A/CC/wKiom1a5SFmwEIlBAABMy5HOdGk592.png "border=" 0 " Width= "720" style= "Margin:0px;padding:0px;border:medium none;line-height:22.4px;font-family: ' Song Body ', Arial, Helvetica , ' San-serif '; Font-size:14px;white-space:normal;background-color:rgb (255,255,255);/>
Gourp.ps1the contents of this section are as follows:
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7A/CC/wKioL1a5SLLx5-aIAACiTH82YIQ856.png "border=" 0 " Width= "720" style= "Margin:0px;padding:0px;border:medium none;line-height:22.4px;font-family: ' Song Body ', Arial, Helvetica , ' San-serif '; Font-size:14px;white-space:normal;background-color:rgb (255,255,255);/>
There are comments, and you may want to set up several groups of members to join the group.
the whole process is roughly the same!!!
has been uploaded to51cto, and so on after the audit is released. http://down.51cto.com/data/2170207
"AD" ad Domain PowerShell bulk Add user Group organizational unit 20160208