Friday, April 9, 2010

How to reboot/shutdown Windows Servers remotely using PsShutdown utility

You need to copy the PsShutdown file on Windows server in a folder. Say I saved the file under a folder called C:\downloadss. Next open windows command prompt, go to  (Start > Run > cmd) and schedule the  reboot:


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