Re: Using wodSSH with PowerShell? (General questions)
Sean,
Can you show us maybe your code snippet?
Drazen
$hostname = esxi-01.noobs.local
$login = root
$password = mypassgoeshere
$ssh = New-Object -ComObject weOnlyDo.wodSSHCom.1
$ssh.Hostname = $hostname
$ssh.Login = $login
$ssh.Password = $password
$ssh.Blocking = 1
$ssh.Port = 22
$ssh.Timeout = 25
$ssh.Connect()
$ssh.DataReady = 0
$ssh.WaitFor( regex:[$ #>] $ )
$ssh.Execute( df -h`r`n , regex:[$ #>] $ )
$ssh.Disconnect()
Normally, when I SSH on in PuTTy my shell gives me the prompt: ~ #
So I guess that $ssh.WaitFor( regex:[$ #>] $ ) is waiting for the shell with a variety of options including #? Once it sees this it then continues on to the $ssh.execute part? Is the regex check on the end of the $ssh.Execute do? Does it also wait for the shell prompt ~ # before continuing?
Sean
Complete thread:
- Using wodSSH with PowerShell? - Sean, 2012-03-13, 19:45
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 21:45
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 21:48
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 21:59
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 22:24
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 22:26
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 22:34
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 22:49
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 22:55
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 23:01
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 23:47
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-14, 22:32
- Re: Using wodSSH with PowerShell? - wodDamir, 2012-03-14, 22:46
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-14, 23:29
- Re: Using wodSSH with PowerShell? - wodDamir, 2012-03-14, 23:58
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-15, 00:03
- Re: Using wodSSH with PowerShell? - wodDamir, 2012-03-14, 23:58
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-14, 23:29
- Re: Using wodSSH with PowerShell? - wodDamir, 2012-03-14, 22:46
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-14, 22:32
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 23:47
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 23:01
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 22:55
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 22:49
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 22:34
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 22:26
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 22:24
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 21:59
- Re: Using wodSSH with PowerShell? - Sean, 2012-03-13, 21:48
- Re: Using wodSSH with PowerShell? - woddrazen, 2012-03-13, 21:45