Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to trigger an action/task when an event is raised in any computer of the domain.

It this possible via GPO, do or I need to deploy script to all machines on the domain?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You are talking about event based tasks in task scheduler.

Yes, it is possible to deploy them through a GPO. They require Vista or later. You will need to use GPP (Group Policy Preferences).

In the Group Policy Management Console (gpmc.msc), edit or create a GPO, navigate to Computer Settings > Preferences > Control Panel Settings > Scheduled Tasks Create a new Scheduled Task (Windows Vista and later)

Here you can create an event based scheduled task just like you would in the normal task scheduler. The crucial part is to choose the right trigger type on the Triggers tab. You should create a trigger and set it to Begin the task: On an event and select which events to trigger on.

You will also need to make sure the machines have access to the script. Either by sharing it somewhere on the network or by copying it to the local disk on the clients, perhaps using the GPP Files function in the same GPO.

Edit: I just realized the question is really old and probably not relevant anymore. It had only been updated by HopelessN00b

share|improve this answer

Well, you can't have GPOs that are triggered by an event. GPOs are basically just registry keys, so they're either one value or another. So you need a script (of some sort) that can be triggered when you event pops up.

There are a few ways I can think of to do this that don't involve a lot of horrible manual copying.

  1. The first way is to deploy a script via GPO, your best option probably being a startup script (so it runs as SYSTEM and doesn't need a logged on user to run) that monitors the event log and then does whatever you need done when this event occurs.

  2. The second way, similar to the first, is to deploy a scheduled task by GPP, your task being the script in question. You can set the scheduled task to simply always be running, or run at an interval (say, every 5 minutes) and scan the event log when it starts.

  3. The third way, which I would probably prefer, provided I could get the hardware to do it, would be to set up a central server to collect forwarded Event Logs, and configure the domain computers to forward the event you're concerned with to the this logging server.

share|improve this answer

Your Answer

 
discard

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.