Using PsShutdown and ZENworks Patch Management 6.3 to Shut Down Windows Workstations

0 Likes
over 13 years ago


By David Hardy

David Hardy explains how to force all Windows 2000/XP workstations on your network to shutdown at certain time. He uses a custom package in ZENworks Patch Management 6.3.



In our environment, we wanted to be sure all PCs were shut down overnight. To do this, I created a batch file using the ‘schtask’ command and psshutdown.exe to create a shutdown task at 11:30 each night. After creating this batch file, I sent it out and executed the file with ZENworks Patch Manager.



  1. Download PsShutdown (free).




  • Create batch file. Here is the batch file I used:

    schtasks /create /tn shutdown /tr "c:\patch\psshutdown.exe /accepteula -c  -t 300"  /sc daily /st 23:30:00  /ru system 

    Explanation:

    The first part creates a task named “shutdown”.

    Starting with “C:\patch\....”, The “patch” directory is where we always place files sent out with Patch Manager.

    This section configures the parameters of the task. If you want the task to run without user intervention, you must put the ‘accepteula’ switch in the task.

    The “–t 300” gives users a warning that the pc is going to shutdown in 5 minutes (300 seconds) As you can see, it runs daily at 11:30 pm (24 hour format).




  • Place this batch file (along with psshutdown.exe) in the same directory. Again I use C:\Patch.

Labels:

How To-Best Practice
Comment List
Anonymous
Related Discussions
Recommended