Skip to main content
Skip table of contents

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

UsageDescription
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:

  • The following command sets the macros directory to a location on the D: drive:

    CODE
    macro directory D:\STR\macros
  • The following example sets the macro directory to C:\ProgramData\STR\SuperADMIN\console\macros (assuming that SuperADMIN is installed in the default location):

    CODE
    macro directory macros

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>).

You can use macros to automate tasks in SuperADMIN (the SuperADMIN console has a command line option that will execute a macro on start up). See Automation and SuperADMIN for more information.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.