I am trying to write a VBScript to log in to PUTTY and execute bunch of commands. I am trying to take the UserID and Password for login from the Input box and then pass it as a variable for login.
But I am not able to pass UserName and Passwrd properly. Please suggest.
Dim UserName
Dim Passwrd
UserName = InputBox("Please Enter Your UserID:")
Passwrd = InputBox("Please Enter Your Password:")
Set shell = WScript.CreateObject("WScript.Shell")
pcmd = "putty.exe -ssh [email protected] -pw Passwrd"
Set exec = shell.Exec(pcmd)
Set pout = exec.StdOut