/
Script to open multiple sessions

Script to open multiple sessions

Sub Main()
Dim objFile, File
Dim objClip
Dim username, password, filename

Set objFile = CreateObject("Scripting.FileSystemObject")
filename = xsh.Dialog.Prompt ("Filename with full path", "Filename", "", 0)
'Set File = objFile.OpenTextFile("d:\test.txt", 1)
Set File = objFile.OpenTextFile(filename, 1)

username = xsh.Dialog.Prompt ("Username", "User name", "", 0)
password = xsh.Dialog.Prompt ("Password", "Password", "", 1)


Do Until File.AtEndOfStream
hostname = File.Readline
'xsh.Screen.Send(hostname + vbCr)
xsh.Session.Open "ssh://"+username+":"+password+"@" + hostname + vbCr
xsh.Session.Sleep(50)
Loop	

File.Close
End Sub


Related content

Script Example
Script Example
More like this
xsh.Session
xsh.Session
Read with this
서버 목록이 있는 파일을 읽어 세션 접속하는 스크립트
서버 목록이 있는 파일을 읽어 세션 접속하는 스크립트
More like this
VBS multisession [1]
VBS multisession [1]
More like this
Which session will be send [1]
Which session will be send [1]
More like this
script [3]
script [3]
More like this