Windows Server 2012 Essentials: Shutdown client machines after a backup
November 23, 2012 6 Comments
This could apply to any of the Essentials Server SKUs including SBS 2011 E, WHS 2011 or Essentials 2012.
We schedule the backups to run between 7pm and 11pm so all the machines will have time to backup. It is really simple to set this shutdown task up, of course some people prefer their machines to go to sleep or hibernate but in this case we actually want to turn off those machines.
Firstly – Do you know where the events are stored for Client Backup? It took me a while to find them.
Windows 7 Client check the Event Log > Applications and Services Logs > Windows Server
Windows 8 Client check the Event Log >Applications and Services Logs > Microsoft > Windows>WindowsServer
Now you know where the logs are, you can look for specific EventID’s to tag tasks onto.
Event ID 513: is a successful backup.
Event ID 514: Is Unsuccessful.
You can simply right click one of these events, and chose to attach a task.
The ‘Create Basic Task’ wizard starts, and you can follow it through to add your shutdown command.
On the first page you can add a description of the task.
On the Action page, you can chose whether this will be a program, email or a message – you can always add more actions later.
More info can be found on shutdown.exe by entering shutdown /? into a CMD prompt, another very useful resource for the command is this page.. http://ss64.com/nt/shutdown.html.
You could also add some additional switches, for example /d – to add reason codes for the shutdown.
When you have done that we can chose to open the properties of the task when you click finish.
In the properties we can set to run this task if the user is logged on or not, and to run in an elevated manner. Clicking OK will prompt for a password to save the task, and that is all you need to do.
If you want to attach additional actions, you can do this on the Actions tab.
Next time a successful backup occurs, the PC will automatically shutdown.
Using this method you can attach custom tasks to any EventID that occurs.