This is for Windows 7 (in corporate environment):
If an admin triggered a remote shutdown (shutdown /m PCName) windows 7 should display a notice saying that the PC is getting instruction to shutdown / restart and give you the countdown.
The user sitting on the PC CAN cancel it, assuming that the user also have admin right on the machine by running:
shutdown /a
to abort any existing shutdown in progress.
But of course this point is moot if the admin put a timer for 1 second, or immediate shutdown.
Windows 8 - You get a notification at the System Tray (when the shutdown is issued) that windows is about to shutdown in xxx minutes, and shutdown will happen at xxx time/date. And I believe at 1 minute to shutdown, Windows 8 will display a full screen notification that you will be shutdown in 60 seconds, and you actually have to click on close to confirm the message.
Windows XP - I believe it will display the timer as well, but I can't confirm as I don't have WinXP machine to test.
Again, you can cancel all 'scheduled' shutdown by the command above, but if you run out of time, not much you can do.
Could the script execute
shutdown -a
and abort the shutdown? – Vinayak – 2016-04-18T21:42:08.393to start sending the events, the OS probably needs to get a request to shutdown first, so isn't it possible to force windows to display a timer whenever such a request is detected? While this timer is counting the user can then issue shutdown /a. The user also has admin privileges so this should not be a problem – user13267 – 2013-05-02T05:37:34.923
I understand that this would also show a timer when I shutdown from the start menu, but that's ok – user13267 – 2013-05-02T05:42:47.693
You are really grasping at straws here. Once the shutdown is initiated - and NOT by you, the shutdown will happen. It will terminate any applications and scripts. – Keltari – 2013-05-02T05:51:45.153