![]() |
![]() |
| Home | What's New | Products | Download | Purchase | Support | About Us | Contact |
SUPPORT > TIPS
|
|
|
|
VRALib Scripting — Issue Commands and Save Output to Excel FileVRALib is a Windows COM and .NET interface that is part of the VanDyke ClientPack for Windows automation toolkit. Using VRALib you can script SSH2 connections to send commands, open port forwarding connections, perform file transfers and file management with SFTP, and manage keys. The example script below first connects to an SSH2 server, runs the Unix/Linux command uptime, and then writes the current date and the results of the uptime command into the first blank row
in the specified Excel spreadsheet. Here is the link to the example script: vralib-rexec-writeresultstoexcel.vbs.txt To get the script ready to run in your environment, edit the script code to replace all occurrences of C:\Temp\ with the location on your file system where you desire log files and the resulting workbook file to be saved. Once you've edited the script to replace C:\Temp\ with the folder location of your choosing, you can launch the script with command line parameters to control the machine to which the connection is made, credentials for authentication, etc. The path to the workbook in which to save the output can also be provided on the command line. For example: CScript.exe "path to this script.vbs" /host:myhost /user:myuser /pass:mypass /wkbk:"C:\uptime.xls" Once you've confirmed the script is working as desired, a batch file can be created that will cause the script to be run across multiple target hosts, with the results stored in the same workbook (one sheet per host specified). For example: ::MyFile.bat Note that the script example contains minimal error checking to handle any connection errors that may occur. The script could be adapted to automatically generate reports to track remote system factors like disk space, uptime, performance, or to test output. The script could be added to the Windows Task Scheduler to be run on a daily, weekly or other interval. New data is appended to the Excel spreadsheet by the script every time it runs. Charts could be added to the spreadsheet so that the report could be used to do trend analysis.
|
|||||||||
| Products | Downloads | Purchase | Support | About Us | |
|---|---|---|---|---|---|
| VShell Server | VShell Server | Buy Direct | Evaluation | Contact | |
| SecureCRT | SecureCRT | License Pricing | Updates Policy | Press Releases | |
| SecureFX | SecureFX | About Encryption Export | FAQs | What's New | |
| VanDyke ClientPack | VanDyke ClientPack | Orders FAQ | Tips & How-Tos | Customer Stories | |
| Beta Software | Beta Software | Resellers | Forums | Secure Solutions | |
|
Site Map | Legal Notices | Privacy Policy | Refund Policy VShell, SecureCRT, SecureFX, Entunnel, CRT, and AbsoluteFTP are trademarks or registered trademarks of VanDyke Software, Inc. in the United States and/or other countries. All other trademarks or registered trademarks are the property of their respective owners. Copyright © 1995 - VanDyke Software, Inc. All rights reserved. |
|||||