c:> at 12:00am c:\downloads\psshutdown.exe -r -f -c -t 10 -accepteula
Above command will reboot the system at 12am. If you want to shutdown system:
c:> at 12:00am c:\downloads\psshutdown.exe -s -f -c -t 10 -accepteula
Where:
- -s: Shutdown specified server
- -r: Reboot specified server
- -f: Forces all running application to exit
- -c: Allow the shutdown to by cancel by user
- -t: Specifies the countdown in seconds until the reboot or shutdow process
- -accepteula (you need to add -accepteula to the psshutdown command, otherwise the task will hang, indicating a “running” state in Scheduled Tasks)
No comments:
Post a Comment