List of accounts to modify from SetupExplorer
Top  Previous  Next


·This script changes/sets the logon script to "mstudents.bat" for all accounts on the server "\\MAIN01" in domain d09.acme.com that are in the same OU or group. No other property than the logon script property is affected. Edit the AD.Account.SetProperty row to set other properties.  
·The [Data] section (list of accounts to edit) is created manually with SetupExplorer.  

[Settings_Begin]
BatchSettings.Delimiter=TAB
BatchSettings.MarkerCol=4
SET ADDomainPath=dc=com/dc=acme/dc=D09
SET ADOUName=MSStudents
SET ADOUPath=%ADDomainPath%/ou=%ADOUName%
[Settings_End]

[Machines_Begin]
\\MAIN01
[Machines_End]

[Batch_Begin]
Data.Loop   
 AD.Account.SetProperty %ADOUPath%/cn=%col1%, LoginScript, mstudents.bat
Data.EndLoop   
[Batch_End]

[Data_Begin]
[Data_End]

What to modify in the script

·[Settings]: edit ADDomainPath and ADOUName  
·[Machines]: replace "\\MAIN01" with the name of your server  
·[Batch]: "AD.Account.SetProperty" command - replace "mstudents.bat" with your script name (replace "LoginScript" to edit other properties)  
·[Batch]: replace "AD.Account.SetProperty" with "AD.Account.SetPassword" to change password etc.  

How to fill the [Data] section from the OU "MSStudents"

·Enter SetupExplorer, select domain, click "Explore", click "AD"  
·In "Filter Accounts" box - enter "26" in the second field and "MSStudents" in the first.  
·Click "Export" - In the export dialog -  
·enter "27" in the "Accounts / Columns" textbox  
·Uncheck the "Groups / Export" checkbox  
·Check "Export to / SetupBatcher [Data] section"  
·Click "Ok"  

How to fill the [Data] section from a group

·Enter SetupExplorer, select domain, click "Explore", click "AD"  
·Click the "Global group membership" tab, click "Explore"  
·Click the column heading of the group you wish to edit  
·Click "Export" - In the export dialog -  
·enter "27" in the "Accounts / Columns" textbox  
·Uncheck the "Groups / Export" checkbox  
·Check "Export to / SetupBatcher [Data] section"  
·Click "Ok"  

How to run the script

·Click "Run batch" in SetupBatcher.