Submit a ticketCall us

Training ClassThe Orion® Platform Instructor-led Classes

Provided by SolarWinds® Academy, these trainings will introduce users to the Orion Platform and its features, management, and navigation. These courses are suitable for users looking to discover new tips, tricks, and ways to adapt their Orion products to better suit their monitoring needs:
Deploying the Orion Platform
Configuring Orion views, maps, and accounts
Configuring Orion alerts and reports

Reserve your seat.

Home > Success Center > Network Configuration Manager (NCM) > NCM Documentation > NCM 7.9 Administrator Guide > Pre-command and command template variables and examples

Pre-command and command template variables and examples

Created by Caroline Juszczak, last modified by Anthony.Rinaldi_ret on Oct 03, 2016

Views: 1,456 Votes: 1 Revisions: 4

Pre-command variables are used in command scripts and device command templates. The Pre-command variables mimic keyboard strokes that are normally entered in the command interface. For more information on creating command scripts, see Command scripts.

Property

Description

${ConfigType}

Value used to insert the type of configuration

${CR}

Carriage return

${CRLF} or $[ENTER]

Carriage return - linefeed combination

${CTRL+@}

CTRL + @

${CTRL+A}

CTRL + A

${CTRL+B}

CTRL + B

${CTRL+C}

CTRL + C

${CTRL+D}

CTRL + D

${CTRL+E}

CTRL + E

${CTRL+F}

CTRL + F

${CTRL+G}

CTRL + G

${CTRL+H}

CTRL + H

${CTRL+I}

CTRL + I

${CTRL+J}

CTRL + J

${CTRL+K}

CTRL + K

${CTRL+L}

CTRL + L

${CTRL+M}

CTRL + M

${CTRL+N}

CTRL + N

${CTRL+O}

CTRL + O

${CTRL+P}

CTRL + P

${CTRL+Q}

CTRL + Q

${CTRL+R}

CTRL + R

${CTRL+S}

CTRL + S

${CTRL+T}

CTRL + T

${CTRL+U}

CTRL + U

${CTRL+V}

CTRL + V

${CTRL+W}

CTRL + W

${CTRL+X}

CTRL + X

${CTRL+Y}

CTRL + Y

${CTRL+Z}

CTRL + Z

${CTRL+[}

CTRL + [
Equivalent to Esc key press

${CTRL+\}

CTRL + \

${CTRL+]}

CTRL + ]

${CTRL+CTRL}

CTRL + CTRL

${CTRL+_}

CTRL + _

${UPARROW}

Up Arrow

${DOWNARROW}

Down Arrow

${RIGHTARROW}

Right Arrow

${LEFTARROW}

Left Arrow

${StorageAddress}

Value used to insert the TFTP server IP address or hostname

${StorageFilename}

Value used to insert the name generated by SolarWinds NCM for the downloaded configuration file

${TransferProtocol}

Value used to insert the transfer protocol used during indirect transfer

Pre-command device template entry example

The following line from a device command template specifies the pre-command, the delay, and the text that triggers the pre-command. Delay and trigger text (RegEx) are optional variables.

<Command Name="Precommand" Value="${CTRL+Y}" Delay="3" RegEx="password:"/>

Preclude pseudoterminal setup with command template variables

If your device does not support pseudoterminal device pairs, you can prevent Telnet from attempting to negotiate pseudoterminal setup by using the following command variable:

<Command Name="allocatePty" Value="false"/>

Specifies that the command script will be run with pseudoterminal mode disabled.

Declare a special command prompt with command template variables

If the command prompt is not > or #, or you need to specify more than one character to designate the command prompt, as in the case of banners using the # character, declare the command prompt using the following command variables:

<Command Name="MenuBased" Value="false"/>

Specifies that the template logic should run in CLI mode

<Command Name="VirtualPrompt" Value="CustomPrompt%"/>

Specifies the exact value of the command prompt designating the device is ready to receive commands.

Switch user context with command template variables

If you log in to a device and must switch user context to execute a command, resulting in a different command prompt, use the following command variables to switch context and recognize the new command prompt:

<Command Name="MenuBased" Value="false"/>

Specifies that the template logic should run in CLI mode

<Command Name="Reset" Value="appropriateSwitchContextCommands" RegEx="newPrompt"/>

Specifies the reset command to switch user context and the new command prompt to expect. Use pre-command variables to designate the switch context commands and specify the entire new prompt in the RegEx value.

Respond to post-login interaction requests with command template variables

If you log in to a device and perform an action and are then prompted for interaction, for example, you receive a Press any key prompt, use the following command variables in the command template to not time out:

<Command Name="PreCommand" Value="${CTRL+Y}"/>

Sent when the device does not respond for three seconds.

<Command Name="PreCommand" Value="${CTRL+Y}" Delay="3"/>

Sent when the device does not respond for more than three seconds.

<Command Name="PreCommand" Value="${CTRL+Y}" Delay="3" RegEx="Press Any Key"/>

Sent when the device does not respond for more than three seconds and the last received data was Press Any Key.

 

Last modified

Tags

Classifications

Public