16.01.2013 Views

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Script Examples<br />

In This Chapter<br />

Example Scripts .............................................................................................. 1153<br />

Example Scripts<br />

This example shows a typical script that uses @login to login to the device, uses @enable to<br />

enter privileged mode, and then executes several Device commands.<br />

@login<br />

@enable<br />

[running-config] show run<br />

[-] exit<br />

This example shows how to login to a device and run a command using only low-level<br />

WhatsConfigured commands:<br />

@connect "login as: "<br />

@write "$(Settings.<strong>User</strong>Name)"<br />

@write $(LoginTerminator)<br />

@read "password: "<br />

@write "$(Settings.Password)"<br />

@write $(LoginTerminator)<br />

@read $(CommandPrompt)<br />

@write "exit"<br />

@write $(CommandTerminator)<br />

This example shows how to combine high-level commands and low-level commands in the<br />

same script as above:<br />

@login<br />

@enable<br />

@write "copy tftp start"<br />

@write $(CommandTerminator)<br />

1153

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!