Account.Delete
Top  Previous  Next


Deletes server or workstation user account

Category
SamAccount

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

Account.Delete
SamAccountNameColumnVariable

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

Other parameters
This command is executed on the current machine in the [Machines] section.  

Example
Delete account and home directory

[Undo_Batch_Begin]
Data.Loop
 Account.Delete %col1%
 DOS echo y| rd c:\users\%col1% /s   
 // The /s switch causes rd to remove all subdirectories and files in the specified directory
Data.Endloop
[Undo_Batch_End]