Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a small domain of about 70 Windows computers (XP and 7). We want to schedule a command (an update mechanism) to run on all computers periodically, and we want the task to run regardless of the computer's connection to our network (i.e. the task should run even on a laptop that isn't connected to our VPN).

We have a Microsoft System Center Essentials 2010 server, so that might come in handy for this (we aren't sure exactly the extent of the capabilities that this provides).

The options I see are these:

  • Do it completely manually. Install the scheduled task by hand or remotely using psexec (and the at command?) for each computer in our network. Enforce that newly imaged computers should have this task installed on them before deployed to the employee, or the task should be in the image. High initial cost (having to do this for each of 70 computers) but building it into the image might work... But there is some maintenance in making sure the task is added to everything. And I fear that a year or two down the road, we will have forgotten about it or gotten sloppy or had new IT employees who miss this step and some computers won't have the task.
  • Having one of our servers run a script that loops through all computers and psexec's the command on each computer in the network -- it would only run on running, connected computers, so this solution wouldn't work. I suspect SCE could do something like this too, but again this is not a good solution.

Neither of these are ideal, and I'm certain there is a better way to do it -- right? What is the best way to accomplish this task?

share|improve this question

You can create a computer based preference policy that contains the scheduled task with the appropriate command line you want to run. Preference policies were a new feature introduced with Windows 2008. With the preference policies you can create your scheduled task that will be pushed out via a GPO and you can centrally manage the settings.

If you want it to apply to all your computers, just link it in at the appropriate OU's and make sure the security filtering is targeted at domain computers (I also turn off the user based settings on the GPO itself).

share|improve this answer
I can't find any of the features you are talking about. Can you point me to any links regarding this functionality? – Ricket Mar 10 '11 at 19:59
Here is an MS link: You should have the server 2008 GPO adm templates installed in order to see the policies in GPMC – BoxerBucks Mar 10 '11 at 20:08

I'd write a startup script that uses the schtasks.exe tool to manipulate the Scheduled Tasks on the subject computers. Microsoft can give you some usage information for the tool, but it's really fairly easy to use. You can find some good discussion about it here on Server Fault, too. I'd have the script to check for the presence of the task and, if it's not present, create it.

Start by writing a script that does what you want in an elevated command prompt on a PC. Once it's working right, assign it as a startup script to a couple of test computers and see that it still does what you want.

share|improve this answer
The scheduled task needs to run as the logged-in user. I experimented with schtasks.exe and that isn't possible with Windows XP; a task must run as a specific user and password. We have a mix of computers but the majority of them are still XP (about 1 Win7 for every 5-6 XP computer) so I need something that will work for both. – Ricket Mar 12 '11 at 15:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.