Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

2012 AD-CSVDE add users in batch

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Create the TXT file and save it in C:\

. Because the password policy of the domain requires length and complexity, and the password cannot be included in notepad, the imported user must be disabled, so the value of userAccountControl is set to 514, and the imported user is disabled. 512 is enabled

DN,objectClass,samAccountName,userPrincipalName,displayName,userAccountControl

"CN= Zhang San, OU= Finance Department, DC=test,DC=com", user,user10,user10@test.com, Zhang San, 514

"CN= Li Si, OU= Finance Department, DC=test,DC=com", user,user11,user11@test.com, Li Si, 514

two,

3. Output the result in C:\:

Connect to "(null)"

Log in with SSPI as the current user

Import directories from the "c:\ aduser.txt" file

Load entry

2: CN= Zhang San, OU= Finance Department, DC=test,DC=com

Attribute 0) objectClass: user

Attribute 1) samAccountName: user10

Attribute 2) userPrincipalName: user10@test.com

Attribute 3) displayName: Zhang San

Attribute 4) userAccountControl: 514

The project was modified successfully.

3: CN= Li Si, OU= Finance Department, DC=test,DC=com

Attribute 0) objectClass: user

Attribute 1) samAccountName: user11

Attribute 2) userPrincipalName: user11@test.com

Attribute 3) displayName: Li Si

Attribute 4) userAccountControl: 514

The project was modified successfully.

2 entries were successfully modified.

Command completed successfully

-

4. Modify the user password in batches:

Enter the following in notepad, change the extension to bat, and execute the batch:

Net user user10 123 please visit QWE

Net user user11 123 please visit QWE

5. Enable the account in batch (failed if the password is empty)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report