Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-07-2010, 09:11 AM
boothrobertl boothrobertl is offline
Registered User
 
Join Date: Jun 2010
Posts: 6
Need script to use existing preconfigured sessions

I am running the latest version of SecureCRT and need some urgent help with a VBS script. We have over 300 sessions and they are all preconfigured with logging (That includes the use of variables for session name, host, month, day, year and time). All sessions use the same ssh login and enable password for our Cisco devices.

What I desperately need is a script that will launch each one of these sessions, login, then jump into “Enable” mode and execute a “show run” and a “wr mem”. (Using our preconfigured sessions rather than a txt file with IP addresses will give us our logging we need) We are going to be powering down the entire network and need to get a quick easy backup and save all current configs to memory.

I saw some scripts online that would allow me to use a file that has the ip addresses to connect too and perform a show run, but I need to have a script use my preconfigured SecureCRT sessions so that I get the same type of logging.

I am really under the gun on this one as our power down is tomorrow.

ANY help will be greatly appreciated!
Reply With Quote
  #2  
Old 06-07-2010, 09:26 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hello boothrobertl,

I have attached an example script that reads in sessions from a file, connects to each one, sends a series of commands, then disconnects from the session and moves on to the next session.

Please see the comments in the example script for the format and expected location of the "SessionList.txt" file.

Will the attached example script help you to accomplish your objective?
Attached Files
File Type: txt ConnectToMultipleSessionsAndSendCommands.vbs.txt (6.5 KB, 916 views)
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:07 AM.