Community
Command Central
MVP Program
Monthly Mission
Blogs
Groups
Events
Media Vault
Products
Observability
Network Management
Application Management
IT Security
IT Service Management
System Management
Database Management
Content Exchange
SolarWinds Platform
Server & Application Monitor
Database Performance Analyzer
Server Configuration Monitor
Network Performance Monitor
Network Configuration Manager
SQL Sentry
Web Help Desk
Free Tools & Trials
Home
Products
Network Performance Monitor (NPM)
VBS script not launch when not logged in
myancey
I'm trying to automate a VBS script for a Telenet session based on a triggered alert. The script works as designed while logged into server. But when the server does not have a logged in session, the script never executes.
Anyone had this problem before?
Here's the script...............................
Sub Main()
dim wshShell
set wshShell = CreateObject("Wscript.Shell")
wshShell.run("telnet <server name>")
Wscript.Sleep 1000
wshShell.SendKeys "<username>~"
Wscript.Sleep 1000
wshShell.SendKeys "<password>~"
Wscript.Sleep 8000
wshShell.SendKeys "<do stuff>.bat~"
End Sub
Call Main()
Matthew Yancey
Network Engineer
Intersil Corporation
Find more posts tagged with
Accepted answers
All comments
udaemen
You can try to let the script execute with a system account with sufficents right.
2020
Rather than scripting a telnet session which i've found to be flakey in the past with delay timings for the keystrokes, use something like PSTools utility PSEXEC to launch the .bat directly remote box.
myancey
Thanks all.
I abandoned the VBS. I've resorted to using Putty SSH and PLink. With Plink, you can specify the profile to load (defined in putty) and then pass the username and passwd via a PLink command line. In the Putty profile, you define the keystrokes to pass upon connection.
Works well.
Putty util details below....
PuTTY Link: command-line connection utility
Release 0.52
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
-v show verbose messages
-ssh force use of ssh protocol
-P port connect to specified port
-pw passw login with specified password
-m file read remote command(s) from file
-L listen-port:host:port Forward local port to remote address
-R listen-port:host:port Forward remote port to local address
Matthew Yancey
Network Engineer
Intersil Corporation
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Best Of