Re: Using wodSSH with PowerShell? (General questions)
Hi Sean,
Here is PowerShell example that will connect to server and execute ls -al command.
[code]$hostname = Read-Host Hostname
$login = Read-Host Login
$password = Read-Host Password
$ssh = New-Object -ComObject weOnlyDo.wodSSHCom.1
$ssh.Hostname = $hostname
$ssh.Login = $login
$ssh.Password = $password
$ssh.Blocking = 1
$ssh.Connect()
$ssh.DataReady = 0
$ssh.WaitFor( regex:[$ #>] $ )
$ssh.Execute( ls -al`r`n , regex:[$ #>] $ )
$ssh.Disconnect()[/code]
Let us know how it goes.
Regards,
Drazen
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