For computers that are running Windows Server® 2008 R2, Windows® 7, Windows Server 2008, or Windows Vista®, Immediate Task (Windows Vista and later) preference items allow you to create tasks to be run immediately upon the refresh of Group Policy that are then removed. Immediate Task preference items do not provide a selection of actions or triggers because they always create a task and then delete it after it has run.
Configuring an Immediate Task (Windows Vista and later) item
To create a new Immediate Task preference item |
-
Open the Group Policy Management Console. Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit.
-
In the console tree under Computer Configuration or User Configuration, expand the Preferences folder, and then expand the Control Panel Settings folder.
-
Right-click the Scheduled Tasks node, point to New, and select Immediate Task (Windows Vista and later).
-
In the New Task (Windows Vista and later) Properties dialog box, select an Action for Group Policy to perform. (For more information, see "Actions" in this topic.)
-
Enter task settings for Group Policy to configure:
- On the General tab, enter a Name for the task to
be configured, and configure security options for the task. (For
more information, see "General task settings" in this topic.)
- Click the Conditions tab, and configure the conditions
required for the task to run. (For more information, see "Other
task settings" in this topic.)
- Click the Settings tab, and enter any additional task
settings for Group Policy to configure. (For more information, see
"Other task settings" in this topic.)
- On the General tab, enter a Name for the task to
be configured, and configure security options for the task. (For
more information, see "General task settings" in this topic.)
-
Click the Common tab, configure any options, and then type your comments in the Description box. (For more information, see Configure Common Options.)
-
Click OK. The new preference item appears in the details pane.
General task settings
Note | |
All text fields accept preference processing variables. Press F3 to display a list of variables from which you can select. |
Name |
Type a name for the task. This name will appear in the list of tasks in Task Scheduler under Administrative Tools. To modify or delete a task, this name must match the name of the existing task as it appears in Task Scheduler. Preference items configuring tasks with the same task name can conflict. |
||||
Description |
Type a description of the task. This description is visible for users or computers to which this preference item is applied. |
||||
Security options |
Configure the security context under which the task is run.
|
||||
Hidden |
Configure whether the task is hidden by default. In Task Scheduler, end-users can click View and Show Hidden Tasks to display hidden tasks. |
||||
Configure for |
For computers that are running Windows Server 2008 R2, Windows 7, Windows Server 2008, or Windows Vista, you can restrict the options displayed to those that are also available in earlier operating systems. However, doing this does not configure the task or the preference item to run on earlier operating systems. |
Task actions
Note | |
All text fields accept preference processing variables. Press F3 to display a list of variables from which you can select. |
A task can start a program, send an e-mail, or display a message. If configuring a task to start a program, on the Actions tab click New, select Start a program, and configure the following options:
Program/script |
Enter the command to be run, excluding any arguments. |
Add arguments (optional) |
Type any command-line arguments required. |
Start in (optional) |
To specify the working directory for the command being run (typically to ensure the correct resolution of any relative file names), type the working directory used when the task is run. Do not include quotation marks or a trailing slash. |
Other task settings
By configuring options on the Conditions tab, you can restrict the conditions under which a task can run or wake the computer to run a task. On the Settings tab, you can configure options to manage the behavior of the task upon completion, to manage the behavior of the task if a problem occurs, or to manage the behavior of the task if an instance of the task is already running.
Additional considerations
- You can use item-level targeting to change
the scope of preference items.
- Preference items are available only in
domain-based GPOs.
Additional references
- Scheduled Tasks
Extension
- For additional information on configuring
settings in Windows, see the Windows Server 2008 TechCenter
(http://go.microsoft.com/fwlink/?LinkId=91710).