Batch change passwords
Top  Previous  Next


This example works on all Windows server versions - from NT 3.51 up to 2003. SetupExplorer is used to create the list of accounts to change passwords for. Passwords are generated automatically with the password generator. The SamAccount command Account.Edit.Password is used to change passwords.

Windows 2000 and 2003 server: the list of accounts can be created automatically with the Data.Get.AD or the Data.Get.AD.Find command and you might want to replace Account.Edit.Password with the AD command AD.Account.SetPassword, see the Windows 2000 and 2003 server example Change domain passwords.

WARNING! It is possible to change passwords for ALL users, including Administrators. If you do not exclude the Administrator user name from the [Data]-section, make sure that you remember your password, or else you will be locked out!

Script

[Settings_Begin]
//Password Generator Settings
Generator.Password.DestCol=3
Generator.Password.Special.Vowels=aeiouy
Generator.Password.Special.Consonants=bcdfghjklmnpqrstvwxz
Generator.Password.Special.Numbers=0123456789
Generator.Password.Special.Special=-+#¤%"!%&
Generator.Password.Special.Format=rnBababas

BatchSettings.Delimiter=TAB
BatchSettings.MarkerCol=4
[Settings_End]

[Machines_Begin]
\\EDU12      NT PDC    
[Machines_End]

[Batch_Begin]
Data.Loop   
Account.Edit.Password %col2%,%col3%   
Data.Endloop   
[Batch_End]

[Data_Begin]
   AccountName   NewPassWord
[Data_End]

How to use the script

·Remove "\\EDU12" from [Machines] section and type the name of your server instead  
·Enter SetupExplorer, select domain, click "Explore"  
·Sort users or filter users by clicking on column headings  
·Click "Export"  
·Enter "2,1" in the "Accounts / Columns" textbox  
·UnCheck the "Groups / Export" checkbox  
·Check "Export to / SetupBatcher [Data] section", choose to overwrite the existing data  
·Click "Ok"  
·Enter SetupBatcher  
·If you want to keep a password for an account - delete that account from the [Data] section. Only accounts listed will have the password changed  
·Click "Action / Run password generator / Pronounceable" (or type passwords manually in the third column)  
·Click "Run Batch"  
·Click "Save" to save the script. The file should be stored on a removable media and kept in a safe place  

Tip

Print password sheets by using the print data section function.