I want to restart remote machines with a custom menu. I want the users to cancel restart and restart to continue if the users does not answer for 5 minutes. Please advise.
You can do this from the command line with the
shutdown -i command. This brings up the GUI where you can add computers to send the shutdown command to. You can also set a timeout for how long the user has to cancel the shutdown/restart process (in your case 300 seconds).
Maybe this will point you in the right direction. Windows Systems Management Server (SMS, now called System Center Configuration Manager) has these capabilities. I don’t admin the desktops here (I’m primarily the Unix/Linux admin), but I know our Windows guys use exactly this for exactly what you are asking.