Reboot script powershell for terminal servers W2K8R2
Posted on 2014-08-21
We 'd need to make a reboot schedule/script for two terminal servers without a broker.
This is the idea: two terminal servers: x and y
* x should reboot every other day at 5 PM, f.e. Monday, Wednesday
* y should reboot the days in between at 5 PM, f.e. Tuesday, Thursday
*reminder (removable) should be given to users that server will be rebooted: "This server will be rebooted within x hours, please logoff by then".
*permanent reminder (not removable) should be given within the last hour: "This server will be rebooted in x hour/min (counting down clock), please logoff or there could be data loss. You can logon to server x/y and continue your work."
*any changes to config should be easily made (change in days, time) ... => GUI?
We'd use a chglogon /drainuntilrestart to make sure no new users logon.
Please advise on concept (how do you use/implement it). I'd prefer Powershell.