[Eisfair] Win7 vom eisfair-Server runterfahren

Olaf Jaehrling eisfair at ojaehrling.de
Fr Mai 15 13:39:52 CEST 2015


Hallo Marcus,


Marcus Roeckrath schrieb am 15.05.2015 um 11:52:
> Hallo,
> 
> wie muss ein "net rpc shutdown" Kommando auf dem eis aussehen, damit man
> einen Win7-Client rrunterfahren kann?

ich mache das mittels ssh und expect. Notfalls ginge es auch per telnet.
================================================0
#!/usr/bin/expect -f
set command0 "shutdown.exe -f -s -t 0"
set command2 "exit"
spawn /bin/ssh roc at 192.168.10.7
  expect {
    "Unable" {
        {exp_continue}
    }
    "assword:" { send PASSWORD\r
    expect "roc" { send "$command0\r" }
    sleep 2
    expect "roc" { send "$command0\r" }
    sleep 2
    expect "roc" { send exit\r }
    expect "roc" { send $command2\r }
    }
  }
=====================================================


Gruß

Olaf


Mehr Informationen über die Mailingliste Eisfair