Example Scripts
- Last Updated: May 12, 2023
- 1 minute read
- WhatsUp Gold
- Version 2026
- Version 2025
- Version 2024
- Version 2023.1
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
@logout
This example shows how to login to a device and run a command using only low-level Configuration Management 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)
@logout