Expand Minimize

Principals (taskType) Element

Specifies the security contexts that can be used to run the task.

<xs:element name="Principals"
    type="principalsType"
 />

The Principals element is defined by the taskType complex type.

Parent element

ElementDerived fromDescription
Task taskType

Defines the task that is performed by the Task Scheduler service.

Child elements

ElementTypeDescription
Principal principalType

Specifies the security credentials for a principal.

Remarks

You can specify up to 32 principals for a task.

For scripting development, the principals of a task are specified using the TaskDefinition.Principal property.

For C++ development, the principals of a task are specified using the Principal property of ITaskDefinition.

Examples

The following XML defines two principals: a user identifier and group identifier principal for the task.


<Principals>
    <Principal>
        <UserId></UserId>
        <LogonType><LogonType>
        <DisplayName></DisplayName>
    </Principal>
    <Principal>
        <GroupId></GroupId>
        <DisplayName></DisplayName>
    </Principal>
</Principals>

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

See also

Task Scheduler Schema Elements
Task Scheduler

 

 

Community Additions

ADD
Show:
© 2014 Microsoft