Script to Remotely restart the computer
In our environment reboot is a major concerns on workstations resulting in non compliance. We need a script which will remotely reboot the workstation but we need to ensure that enduser after 5 log off and login or in hibernate mode once comes on on the 6 time even enduser tries to log off give a message to close all apllication and forcefully restart the machine.
Community Chosen Answer
i use autohotkey to compile a exe, and then push it via psexec or a logon script.
MsgBox, 4144, Message From Administrator, Your Computer needs to restart. Please Press OK to restart now.
The "4144" makes it so that the user can only press ok and it stays on top. "Shutdown,6" restarts the computer without interuptions.
Then use psexec like so to push it to the user (assuming your admin on a domain)...
psexec.exe \\ComputerName -s -i -f -c C:\reboot.exe
where C:\reboot.exe is where you compiled your autohotkey script.