Windows Server 2012 Essentials: Shutdown client machines after a backup
November 23, 2012 6 Comments
A client of ours who is running a Windows Storage Server 2008 R2 Essentials on their SBS 2011 Standard network (for client PC Backup)
likes their machines to shutdown each night after a backup.
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.
In this case we want a program, and that program will be ‘shutdown.exe’ and the arguments will be /s and /f (for shutdown and force).
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.
Or simply install Lights-Out and configure the action after backup.
You mentioned “We schedule the backups to run between 7pm and 11pm so all the machines will have time to backup.”
How/where do you adjust the client backup time window? I’ve not found this option in WS2012E.
I believe it is in the same place as 2011, but not near a server to check.
Are there corresponding events on the server (now 2012 R2 Essentails)? Can’t seem to find them. I’ve seen the server trigger/manage the backup sequence. Would like to know why one client is incomplete, for example.
The logs are now under, Microsoft>Windows>ServerEssentials
Excellent, thanks. Lots of alerts in that log, but the backup tasks are there too, with event IDs in the 200s:
258 start machine
260 start volume
261 finish volume
259 finish machine
I assume there are other events if a backup fails, loses connection, etc.
Now I have another problem: one desktop is updating this log so often with 1284 events that the 1MB log doesn’t even have one hour of data…