Thread: RDP comands via shell script
hi all, ( have feeling 1 try rip me new 1 on here goes.)
place working has 20 windows computers remote desktops used admins make various system modifications. thats fine, more repeitive admin tasks, write automation script logins , execute generate , execute batch scripts in windows sessions.
so, can create expect script me far login rdp session remote computers. down side when windows session launches, have no more terminal output "expect" using expect becomes useless. there issue of how send commands windows remote environment when i'm not getting feed terminal. thinking surely, there must terminal interactions going on, there way can access info?
here rdp login code have far, when got stuck not knowing "expect" next.
idea? automate windows management linux, makes whole lot os sense me.
code:#!/usr/bin/expect -f #open rdp sessions. set timeout 4 set dictionary [lindex $argv 0] set file [lindex $argv 1] set user [lindex $argv 2] if {{llength $argv] != 3} { puts stderr "usage: $argv0 <dictionary-file> <hosts-file> <users>\n" exit } set tryhost [open $file r] set trypass [open $dictionary r] set passwords [read $trypass] set hosts [read $tryhost] foreach ip $hosts { foreach passwd $passwords { spawn rdesktop -u $user -p $passwd $ip
powershell
sshd via cygwin
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] RDP comands via shell script
Ubuntu
Comments
Post a Comment