Configure an Immediate Task Item (At least Windows 7)

Applies To: Windows 8, Windows Server 2008 R2, Windows Server 2012

For computers that are running Windows Server® 2012 or Windows® 8, Immediate Task (At least Windows 7) preference items, ( Immediate Task (Windows Vista and later) preference items if running Windows Server® 2008 R2 or Windows® 7), allow you to create tasks to be run immediately and then removed each time Group Policy refreshes. 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.

Important

  • Two actions for Immediate Task (At least Windows 7) preference item Send an email and Display a message , are deprecated for computers that are running Windows Server 2012 and Windows 8. No visible action takes place when applying these settings. The failure message 0x80041330-The task definition uses a deprecated feature is displayed in the log file. These settings still apply to computers that are running Windows Server 2008 R2 and Windows 7

  • Immediate Task (At least Windows 7) preference items, ( Immediate Task (Windows Vista and later) if running Windows Server® 2008 R2 or Windows® 7), preference items can only be used to create tasks to be run immediately and then removed each time Group Policy refreshes for computers that are running Windows Server 2012, Windows 8, Windows Server 2008 R2 and Windows 7.

  • Configuring an Immediate Task (At least Windows 7) or Immediate Task (Windows Vista and later) item

    To create a new Immediate Task preference item

    1. Open the Group Policy Management Console . Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit .

    2. In the console tree under Computer Configuration or User Configuration , expand the Preferences folder, and then expand the Control Panel Settings folder.

    3. Right-click the Scheduled Tasks node, point to New , and select Immediate Task (At least Windows 7) , if running Windows Server 2012 or Windows 8, or Immediate Task (Windows Vista and later) , if running Windows Server 2008 R2 or Windows 7.

    4. In the New Task (At least Windows 7) Properties dialog box, if running Windows Server 2012 or Windows 8, (or New Task (Windows Vista and later) Properties dialog box, if running Windows Server 2008 R2 or Windows 7), select an Action for Group Policy to perform. (For more information, see Task actions in this topic.)

    5. Enter task settings for Group Policy to configure:

      1. 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.)

      2. Click the Conditions tab, and configure the conditions required for the task to run. (For more information, see "Other task settings" in this topic.)

      3. 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.)

    6. Click the Common tab, configure any options, and then type your comments in the Description box. (For more information, see Configure Common Options.)

    7. 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.

    • If the preference item is part of Computer Configuration , by default the task is run in the security context of the SYSTEM account.

    • If the preference item is part of User Configuration , by default the task is run in the security context of the logged-on user. Unless you provide credentials, the task is run only if the user is logged on to the computer, but can continue after the user logs off.

    • To run a task under the security context of a specified account (regardless of whether that account is logged on), click Change User or Group , enter credentials for the account, and then click Run whether user is logged on or not .

    Security Note
    This password is stored as part of the GPO in SYSVOL and is discoverable, although obscured. If you choose to store passwords in preference items, you should consider creating dedicated accounts for this purpose, and never store administrative passwords in preference items.

    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