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
Awesome - that is all I needed (this line here):
$ssh = New-Object -ComObject weOnlyDo.wodSSHCom.1
Thank you :) I think I can refer to your documentation for the rest. I didn't know how to get the ComObject loaded (or what it was called).
Thanks again.
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