title: Telnet Reset with VBscript / Wscript
body: <p>This VBSCRIPT code throws a 800A0400 error.  Any thoughts?</p>
  
  <pre><code>&lt;job&gt;
  &lt;script language="VBScript"&gt;
  Option Explicit
  On Error Resume Next
  Dim WshShell
  set WshShell=CreateObject("WScript.Shell")
  WshShell.run "cmd.exe"
  WScript.Sleep 500
  'Send commands to the window as needed - IP and commands need to be customized
  'Step 1 - Telnet to remote IP'
  WshShell.SendKeys "telnet 123.456.789.01"
  WshShell.SendKeys ("{Enter}")
  WScript.Sleep 500
  'Step 2 - Issue Commands with pauses'
  'USERNAME
  WshShell.SendKeys "USERNAMEHERE"
  WshShell.SendKeys ("{Enter}")
  WScript.Sleep 500
  'PASSWORD
  WshShell.SendKeys "PASSWORDHERE"
  WshShell.SendKeys ("{Enter}")
  WScript.Sleep 500
  'RESET
  WshShell.SendKeys "reset"
  WshShell.SendKeys ("{Enter}")
  WScript.Sleep 500
  'CONFIRM
  WshShell.SendKeys "y"
  WshShell.SendKeys ("{Enter}")
  WScript.Sleep 500
  'Step 3 - Exit Command Window
  WshShell.SendKeys "exit"
  WshShell.SendKeys ("{Enter}")
  WScript.Quit 
  &lt;/script&gt;
  &lt;/job&gt;
  </code></pre>