This example shows a typical script that uses @login to login to the device, uses @enable to enter privileged mode, and then executes several Device commands.
@login
@enable
[running-config] show run
[-] exit
This example shows how to login to a device and run a command using only low-level WhatsConfigured commands:
@connect "login as: "
@write "$(Settings.UserName)"
@write $(LoginTerminator)
@read "password: "
@write "$(Settings.Password)"
@write $(LoginTerminator)
@read $(CommandPrompt)
@write "exit"
@write $(CommandTerminator)
This example shows how to combine high-level commands and low-level commands in the same script as above:
@login
@enable
@write "copy tftp start"
@write $(CommandTerminator)
@write "$(TFTPServerAddress)"
@write $(CommandTerminator)
@write "$(TransferFileName)"
@write $(CommandTerminator)
@write $(CommandTerminator)
[-] exit