@grissess batch scripts for the ITL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
722 B

# This script reboots Linux machines into Windows.
# It does this by affecting the boot order of the Windows partition to be first (which is temporary for the next run only, after that it will resume defaulting to Linux if configured correctly)
for host in $(cat good_hosts); do
ssh "${user}@${host}" -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o ConnectTimeout=1 -n "sudo grub-reboot 'Windows Boot Manager (on /dev/sda2)'; sudo reboot" &
#ssh "${user}@${host}" -p 13699 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=1 "shutdown /r /f"