Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VBS Script to use putty link - help please

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,62425
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBS Script to use putty link - help please
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VBS Script to use putty link - help please - 7/16/2008 2:37:38 PM   
  chmoo

 

Posts: 5
Score: 0
Joined: 7/16/2008
Status: offline
 Hi Guys,

Im trying to create a script that will connect to a list of linux servers 1 by 1..
The application PLINK i have works fine, it uses command line.
The parameters are; -v -load username -l root -pw password  -m commandlistfiletorun

So basicaly what im trying to do is, every morning i need to check a bunch of servers. So for example we will say i need to check the date on each server and create an excel spread sheet with

Servername Date
blah blah     20/9/2008
ba               19/9/2008

Does this make sence?


Thank you
 
 
Post #: 1
 
 RE: VBS Script to use putty link - help please - 7/16/2008 11:21:31 PM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
If you have a command line it should be fairly simple to convert it into a vbscript.  First thing I would suggest would be to take your command line and get it to run once against 1 server.  Start out using .RUN, see the WSH documents for help with this.

Start with something like this:
WshShell.Run "cmd /K plink -v -command etc",1,True

Once you have that working redirect to a text file
WshShell.Run "cmd /C plink -v -command etc >c:\ServerName.txt",1,True

Once you have that, you can then start to use readline to get the text file into vbscript.

Start putting something together and post when you have questions.  the WSH docs will help with the basics.

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to chmoo)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBS Script to use putty link - help please Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts