var l_objArgs = WScript.Arguments;
g_objTelnetAutomation.AutoStart(l_objArgs(0), WScript.FullName, true, true);
g_objWMIInstance = GetObject("winmgmts://./root/cimv2:" +
eXc_nonWindows_OperatingSystem.Name='" + l_objArguments(0) + "'");
Once you have successfully connected and logged in to the host (via AutoStart),
you will be able to start passing commands and capturing the results.The following
is an example of using the TelnetAutomation object to invoke a command and grab
the results.
var l_ulongCommandLine1 = g_objTelnetAutomation.key("df -h");
var l_stringData1 = g_objTelnetAutomation.getData(l_ulongCommandLine1);
With the command’s output in a standard ...