macro
When performing repetitive tasks, instead of entering each command at the command line, you can enter the commands in a macro and then run the macro.
You can use the macro command to:- Record all the commands you type into the console to a file.
- Play back a previously recorded macro file (this re-executes all the commands in the macro without you having to type them again).
By default, macros are stored in the SuperADMIN console\macros directory, but you can use the macro command to change this. In a default installation the macros directory is: C:\ProgramData\STR\SuperADMIN\console\macros
You can also write your own macros in a text editor and then play them in the SuperADMIN console: simply save the text file in the macros directory with the file extension .sam
Usage | Description |
---|---|
macro record <name> | Starts recording all commands to the specified macro file. SuperADMIN will save the macro file to the console\macros directory. |
macro stop <name> | Stops recording commands to the specified macro. |
macro stop | Stops recording all macros. |
macro {play|run|exec} <name> | Plays back the specified macro. |
macro directory | Displays the current location of the macros directory. |
macro directory <directory> | Changes the location of the macros directory. You can either enter a full path to the directory or you can enter a path relative to the location of the SuperADMIN console. For example:
|
If you are recording a macro and you use the login
command and enter the username and password when prompted, then those credentials will not be saved to the macro.
To save a login command with credentials, use the short form of the login command (login <username> <password>
).