locked
Looking for addin that will shut down clients RRS feed

  • Question

  •  

    I'm looking for a addin that will shutdown each client after it is backed up.  Or even turn on a client back it up then shut it down.  Am I dreamin?
    Saturday, April 5, 2008 1:18 PM

Answers

  • Here's a workaround for the OP. You'll need the PsShutdown tool from SysInternals (drop it in your path, or run it with a fully qualified path) if you want to hibernate your computer or put it in standby. I've tested the individual parts (the call to BackupEngine was a long time ago; confirm that it still forces a backup without popping an interface and waits for the backup to finish or fail), but not the whole shebang.

    Here's a batch file:

    Code Snippet
    @echo off  
    REM change to default Windows Home Server folder  
    C:  
    CD "\Program Files\Windows Home Server"  
     
    REM run a backup right away. When tested,  
    REM this waited for the backup to finish before  
    REM exiting, and didn't pop an interface.  
    BackupEngine -a  
     
    REM shut down the PC.  
    shutdown -s -t 00 -f  
     
    REM or hibernate it.  
    REM psshutdown -h -t 00  
     
    REM or suspend it.  
    REM psshutdown -d -t 00 

    Schedule this (on the client) to run when you want the client to try to back up. I believe that you'll need the scheduled task to run in the security context of an administrator.
    Tuesday, April 29, 2008 4:23 PM
    Moderator
  • Ran across this while Google'ing for this functionality.  I'm surprised MORE people haven't mentioned this - perhaps they just aren't savvy enough or perhaps they don't mind the strain the backup puts on your system while it's going (not that ANY backup system would be behave any differently).

     

    As for me, I also have 4 systems in my household (2 Windows Vista and 2 Windows XP Prof).  WHS is used for backups and for central data storage (1 drive right now to avoid the corruption issue).  I am also using it for antivirus (avast! is working amazingly well overall).  I also do some other backups on WHS with a product called DirSync, which does some individual directory backups throughout my network between different computers, as well as backing up all the WHS Shares to an external drive (which I then swap out and keep at a different site).  This of course is notwithstanding the PP1 testing I am doing right now which includes this functionality.

     

    All that to say my WHS is doing a lot (understatement) and I don't want it impacting my family during the day AT ALL.  Therefore, we only turn on our computers as needed throughout the day and then shut them down when finished.  In the VERY EARLY morning hours, the computers are set to autowake (via the BIOS - works great) at a set time.  I then have WHS backups, Dirsync backups, and avast! antivirus scans and updates all set accordingly for my "nightly maintenance window".  I then want the computers to shut back down at the end of the window.

     

    Now, I've been shutting computers down remotely for years now with various client applications, scheduled windows tasks, etc.  I actually find it very difficult to NOT get a scheduled shutdown to work in Vista.  On the contrary, I find it very difficult TO get a scheduled shutdown to work like I want it in Windows XP (especially with the parameter bugs in Scheduled Tasks in XP).  Then, of course, you run into issues like security and the transfer of plain text passwords (such as when you use Sysinternal's, now Microsoft's, psexec), not to mention the administrative hassles of managing all the various client shutdowns.

     

    Overall, I would think it would be a no-brainer to consider this for WHS as part of the product or as an add-in.  The benefits are considerable:

     

    - Console integration for ease of administration

    - Console integration for centralization of administration

    - Protection against stupidity

    - Assurance that necessary backups aren't accidentally overridden by a scheduled shutdown (as part of the WHS product, Microsoft would be better positioned to hook all the different components together properly)

    - User Security (the ability to control which user should be used for remote computer operations through WHS's user APIs)

    - Password Security (plain text passwords no longer an issue and not as easily discovered/cracked)

    - Not having to manually (and painfully) setup these so called "client shutdown applications" as a service so they will run even when not logged in

    - Not having to deal with bugs and issues with scheduled tasks

    - Logging & event functionality

    - and on, and on...

     

    I imagine this is probably much more sought after than anyone realizes.  I'm assuming you understand that most WHS users don't even realize that after hours capabilities exist with some effort.  And, I'm speaking about the tech savvy ones (not even considering all the non-tech savvy users Microsoft is supposedly trying to reach out to with WHS).  Heck, many of my colleagues wouldn't even recognize this and they work with this stuff all day.

     

    Of those that do recognize it, many just don't want to go through the efforts to deal with it, discuss it, post about it, research it, etc.  I can say without a doubt that everyone I personally know using WHS would find this to be an invaluable piece of the puzzle.  Of course, it would also help me not have to troubleshoot their ad-hoc nightly system setups anymore either.......

     

    In closing, I would think this functionality would be higher on the priority list and not based solely on some "perceived" need.  Considering not a single one of the 1200 users in my company would accept backups or scans at work, and considering all the Green efforts these days, just seems like the right way to go for customers at home as well.  Try giving them something they may not realize the value of just yet.

    Friday, June 13, 2008 6:17 AM

All replies

  • You need a piece of software on your client for that purpose, not an add-in, though you might be able to get it to work by just configuring a couple of scheduled tasks.
    Saturday, April 5, 2008 8:15 PM
    Moderator

  • Monday, April 7, 2008 4:05 AM
  • If you read my post you would see I wanted to shutdown the clients not the server.

     

    Monday, April 7, 2008 11:42 AM
  • Yes, and to shut down the client, you will (in practice) need software on the client.
    Thursday, April 24, 2008 11:29 AM
    Moderator
  • XP has the shutdown command that will shutdown/reboot remote PCs. Sysinternals has a similar command. Couldn't an addin execute one of these (or whatever internal functionality is used) to shutdown the remote PCs?
    Thursday, April 24, 2008 8:14 PM
  • Have you tried AutoExit for WHS already?

    http://www.wegotserved.co.uk/2008/01/16/add-in-review-autoexit-2008/

     

    Regards,

    Jeroen

    Tuesday, April 29, 2008 1:55 PM
  • Unless I'm missing something I don't see where autoexit will shut down a remote PC after a backup which is what the original request is for. It appears to be only for someone logged on the the WHS console to force another remote PC to shutdown.
    Tuesday, April 29, 2008 2:28 PM
  • Here's a workaround for the OP. You'll need the PsShutdown tool from SysInternals (drop it in your path, or run it with a fully qualified path) if you want to hibernate your computer or put it in standby. I've tested the individual parts (the call to BackupEngine was a long time ago; confirm that it still forces a backup without popping an interface and waits for the backup to finish or fail), but not the whole shebang.

    Here's a batch file:

    Code Snippet
    @echo off  
    REM change to default Windows Home Server folder  
    C:  
    CD "\Program Files\Windows Home Server"  
     
    REM run a backup right away. When tested,  
    REM this waited for the backup to finish before  
    REM exiting, and didn't pop an interface.  
    BackupEngine -a  
     
    REM shut down the PC.  
    shutdown -s -t 00 -f  
     
    REM or hibernate it.  
    REM psshutdown -h -t 00  
     
    REM or suspend it.  
    REM psshutdown -d -t 00 

    Schedule this (on the client) to run when you want the client to try to back up. I believe that you'll need the scheduled task to run in the security context of an administrator.
    Tuesday, April 29, 2008 4:23 PM
    Moderator
  • Not a bad workaround other than it requires putting/scheduling this on each client. I guess that's why it's a workaround

    Question 1: When using this would you wind up with 2 backups per day: the WHS automatic one and then this scheduled one? Can you you turn off the auto backup function, either per remote or completely?

    Question 2: Does the BackupEngine command allow you to specify a remote computer to backup? If so then a single batch file could be scheduled on WHS and not on the clients.
    Tuesday, April 29, 2008 5:49 PM
  •  

    Sorry for the mixup, I understood wrong.

     

    Jeroen

    Tuesday, April 29, 2008 5:52 PM
  • Yes, it's a workaround. I want to mention that I think it very unlikely that you will see functionality like this in the product before the next major release of Windows Home Server. And maybe not then; I don't know what the real demand is for it among the majority of WHS users. I don't have even a rough time frame that I could give you for the next major release. (Note that Power Pack 1 is considered to be a minor release.)
    1. Turn off automatic backup for that client on the server. The client will pick that up the next time it runs a backup (if not before). Windows Home Server scheduled backups are controlled from the client, not the server. Running BackupEngine is effectively what the connector does anyway.
    2. No, you can only back up the local machine. There are clever things you can do to cause remote execution of programs, but it's not terribly easy and Windows Home Server doesn't have any special built-in support for making that happen. If you really need it, roll your own. Smile
    Also, as I said I haven't done an end to end test of this. It should work, but use it at your own risk.
    Tuesday, April 29, 2008 6:04 PM
    Moderator
  • Recently ran into this thread, tried the suggested solution and thought I'd share my experience:

    First a little background: I've had my server built and running for about a month and a half now on a home network with 4 client computers.  The backup window is set for midnight to 4am.  To save energy, I have the client PC's hibernate or standby after an hour or so of idle time.  One of these clients is an older machine with an IWILL KK266 motherboard in it and only supports S1 and S4 standby/hibernate modes (no S3 available).  The connector software installed fine, I could run manual backups and automated back-ups worked fine as long as the computer was powered on or in S1 Standby but the machine would never wake-up on it's own and run a back-up if it had been hibernated (S4).  I didn't really care to leave it in S1 as most everything was still powered on so it wasn't saving much (any?) energy and as well it was located in a bedroom so the noise of the fans was a potential issue (although it is a teenagers room Smile ).   By scheduling the machine to wake-up at midnight using the scheduler available in the bios I could occasionally get the automated back-up to work but depending on the relative backup schedules, it had often hibernated again by the time it's turn came about and seemed to typically go 3-5 days between successful backups.

    Reading this thread I decided to try Ken's batch file suggestion with the thought that I could use the bios to wake the machine and have the batch file scheduled task run perhaps 5 minutes later.  Based on a couple trial runs this afternoon, that seems to work just fine.  The only issue I have run into in terms of the suggestions is that if I turn off the automatic back-up for this client on the server, then the "BackupEngine.exe -a" command does not do anything, the script simply runs right through it and onto the next instruction (which is to hibernate).  I don't know if this behavior is as expected or not but it is repeatable. 

    In my case, since the connector software does not successfully wake up this older PC, I will not have the problem of duplicate backups so this solution still seems like a good one for me.  I will probably reduce my normal back up window a bit and then schedule the bios and batch files on this PC to run after that to avoid conflicts.

    Thanks to all who contributed to this thread as it helped me resolve the problem with my particular setup.

    Mark
    Wednesday, May 28, 2008 11:50 PM
  • Ran across this while Google'ing for this functionality.  I'm surprised MORE people haven't mentioned this - perhaps they just aren't savvy enough or perhaps they don't mind the strain the backup puts on your system while it's going (not that ANY backup system would be behave any differently).

     

    As for me, I also have 4 systems in my household (2 Windows Vista and 2 Windows XP Prof).  WHS is used for backups and for central data storage (1 drive right now to avoid the corruption issue).  I am also using it for antivirus (avast! is working amazingly well overall).  I also do some other backups on WHS with a product called DirSync, which does some individual directory backups throughout my network between different computers, as well as backing up all the WHS Shares to an external drive (which I then swap out and keep at a different site).  This of course is notwithstanding the PP1 testing I am doing right now which includes this functionality.

     

    All that to say my WHS is doing a lot (understatement) and I don't want it impacting my family during the day AT ALL.  Therefore, we only turn on our computers as needed throughout the day and then shut them down when finished.  In the VERY EARLY morning hours, the computers are set to autowake (via the BIOS - works great) at a set time.  I then have WHS backups, Dirsync backups, and avast! antivirus scans and updates all set accordingly for my "nightly maintenance window".  I then want the computers to shut back down at the end of the window.

     

    Now, I've been shutting computers down remotely for years now with various client applications, scheduled windows tasks, etc.  I actually find it very difficult to NOT get a scheduled shutdown to work in Vista.  On the contrary, I find it very difficult TO get a scheduled shutdown to work like I want it in Windows XP (especially with the parameter bugs in Scheduled Tasks in XP).  Then, of course, you run into issues like security and the transfer of plain text passwords (such as when you use Sysinternal's, now Microsoft's, psexec), not to mention the administrative hassles of managing all the various client shutdowns.

     

    Overall, I would think it would be a no-brainer to consider this for WHS as part of the product or as an add-in.  The benefits are considerable:

     

    - Console integration for ease of administration

    - Console integration for centralization of administration

    - Protection against stupidity

    - Assurance that necessary backups aren't accidentally overridden by a scheduled shutdown (as part of the WHS product, Microsoft would be better positioned to hook all the different components together properly)

    - User Security (the ability to control which user should be used for remote computer operations through WHS's user APIs)

    - Password Security (plain text passwords no longer an issue and not as easily discovered/cracked)

    - Not having to manually (and painfully) setup these so called "client shutdown applications" as a service so they will run even when not logged in

    - Not having to deal with bugs and issues with scheduled tasks

    - Logging & event functionality

    - and on, and on...

     

    I imagine this is probably much more sought after than anyone realizes.  I'm assuming you understand that most WHS users don't even realize that after hours capabilities exist with some effort.  And, I'm speaking about the tech savvy ones (not even considering all the non-tech savvy users Microsoft is supposedly trying to reach out to with WHS).  Heck, many of my colleagues wouldn't even recognize this and they work with this stuff all day.

     

    Of those that do recognize it, many just don't want to go through the efforts to deal with it, discuss it, post about it, research it, etc.  I can say without a doubt that everyone I personally know using WHS would find this to be an invaluable piece of the puzzle.  Of course, it would also help me not have to troubleshoot their ad-hoc nightly system setups anymore either.......

     

    In closing, I would think this functionality would be higher on the priority list and not based solely on some "perceived" need.  Considering not a single one of the 1200 users in my company would accept backups or scans at work, and considering all the Green efforts these days, just seems like the right way to go for customers at home as well.  Try giving them something they may not realize the value of just yet.

    Friday, June 13, 2008 6:17 AM
  • Nice thought out post Shaun!

     

    Saturday, June 14, 2008 12:18 PM
  •  

    Check out this link, found it when I was researching HP media server.  Hope thi sis what you were looking for.

     

    http://www.wegotserved.co.uk/2008/01/16/add-in-review-autoexit-2008/

     

    Nick

    Monday, June 16, 2008 3:34 PM
  •  

    Nick, that's actually a great add-in that I've already been using.  Unfortunately, it doesn't meet the "scheduling" needs that we are expressing.  We're looking for something that can (1) be scheduled, and (2) be centered around the WHS processes (such as scheduling a shutdown AFTER a backup is complete, or at least ensuring that a set schedule can be postponed if a backup isn't finished).

     

    Kanebrake, thanks!  I've learned that if you don't describe something in detail and present it well, it usually gets ignored.  Somehow, I have a sneaky suspicion this is going to get ignored anyway.  Smile

    Monday, June 16, 2008 4:17 PM
  •  

    Monday, June 16, 2008 4:22 PM