Create a CLI Macro from CLI History or from an Existing CLI Macro

In this procedure, you are going to create a user-defined macro from a command you have already run, another user-defined macro, or from a system-defined macro.

Procedure


Step 1

In the left pane, click Inventory.

Note

If you want to create a user-defined macro from CLI history, select the device on which you ran the command. CLI macros are shared across devices on the same account but not CLI history.

Step 2

Click the Devices tab.

Step 3

Click the appropriate device type tab and select an online and synced device.

Step 4

Click >_Command Line Interface.

Step 5

Find the command you want to make a CLI macro from and select it. Use one of these methods:

  • Click the clock to view the commands you have run on that device. Select the one you want to turn into a macro and the command appears in the command pane.

  • Click the CLI macro favorites star to see what macros already exist. Select the user-defined or system-defined CLI macro you want to change. The command appears in the command pane.

Step 6

With the command in the command pane, click the CLI macro gold star . The command is now the basis for a new CLI macro.

Step 7

Give the macro a unique name. Provide a description and notes for the CLI macro if you wish.

Step 8

Review the command in the Command field and make the changes you want.

Step 9

Replace the parts of the command that you would want to modify, when you run the command, with a parameter name surrounded by curly braces.

Step 10

Click Create. The macro you create is available for use on all the devices of that type, not just the one you initially specified.

To run the command see, Running CLI Macros.