Account.Edit
Top  Previous  Next


Modifies server or workstation user account properties, except password

Notice
Windows 2000 server: AD.Account.SetProperty manages more properties than Account.Edit.

Category
SamAccount

Script section
[Batch], inside Data.Loop..EndLoop statement

Account.Edit
SamAccountNameColumnVariable [,SettingsPrefixNumber]

SamAccountNameColumnVariable
Format: %colX%, X = Column in [Data] section with existing SamAccountNames  

SettingsPrefixNumber [Optional parameter]
1-5  
 
Properties are normally read from the standard user account settings in the [Settings] section, but when there are more than one account.edit command, or both an account.edit and an account.create command in a script, you probably want to use different settings for the different commands. The solution is to specify a settings prefix number in the account.edit command and precede each normal setting in [Settings] by a prefix number and underscore ("1_", "2_" etc.). See below example.  
 
Tip: set "BatchSettings.Debug=Yes" to display SET variables used by account.edit in the status window.  

Other parameters
This command is executed on the current machine in the [Machines] section.  
 
Properties to edit are specified as SamAccount [Settings], only properties included in [Settings] are modified, all other properties are left as is.  

Examples
1) Edit properties in a previous "account create" script

·Open a script (.cnu) file with accounts already created.  
·Replace the command "Account.Create" with "Account Edit".  
·Edit the settings you want to change.  
·Click "Remove markers".  
·Click "Run batch".  

2) Settings prefix number example

[Settings_Begin]
SET 1_Account.ProfilePath=%servername%\PROFILES\MYPROFILE
SET 1_Account.FullName.Col=6 
[Settings_End]

[Batch_Begin]
Data.Loop
 Account.Edit %col5%,1
Data.Endloop
[Batch_End]