2.2.1.18.3 TaskV2 Inner Element
Each TaskV2 inner element contains an embedded Task element, which follows the schema that is defined at [MSDN-TaskSchS]. The unique attributes that are found on the Properties element are defined in the following table.
Attribute name |
Description |
---|---|
action |
(optional) If specified, the value MUST be C, D, R, or U, corresponding to Create, Delete, Replace, and Update. If not specified, the default value is U.
|
name |
Sets a name for the scheduled task. This name appears in Control Panel under the list of scheduled tasks for users or computers. To modify or delete a task, this name MUST match the name of the existing task as it appears in Control Panel for users or computers. Scheduled tasks and immediate tasks that have the same name will not conflict. |
runAs |
Configures the security context under which the task is run. If the preference item is part of the Computer Configuration, by default, the task runs in the security context of the Task Scheduler service, which is typically the System account. If the preference item is part of User Configuration, by default, the task runs in the security context of the user who is logged on. The task runs 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 (enabling the task to run regardless whether that account is logged on), set the Run as option and then set credentials for the account. These fields apply only if the action selected is Create, Replace, or Update. |
logonType |
MUST be Group, Service Account, or InteractiveToken. |
cpassword |
(optional) The password of the runAs credentials. The password is encrypted by using an Advanced Encryption Standard (AES) key when the preference item is created. |