Rediger

Del via


Principal (principalType) Element

Specifies the security credentials for a principal. These credentials define the security context that a task runs under.

<xs:element name="Principal"
    type="principalType"
 />

The Principal element is defined by the principalType complex type.

Parent element

Element Derived from Description
Principals principalsType Specifies the security principals associated with the task.

Child elements

Element Type Description
DisplayName string Specifies the name of the principal that is displayed in the Task Scheduler UI.
GroupId string Specifies the identifier of the user group required to run tasks associated with the principal.
LogonType logonType Specifies the security logon method required to run those tasks associated with the principal.
UserId string Specifies the user identifier required to run tasks associated with the principal.

Attributes

Name Type Description
Id ID Identifier of the principal definition.

Remarks

For scripting development, the security credentials for a principal are specified using the Principal object.

For C++ development, the security credentials for a principal are specified using the IPrincipal interface.

The child elements listed above are defined by the principalType complex type. For sequencing information for these child elements, see principalType.

Examples

The following XML defines a principal with a user identifier.

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

The following XML defines a principal with a group identifier.

<Principals>
    <Principal>
        <GroupId></GroupId>
        <DisplayName></DisplayName>
    </Principal>
</Principals>

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]

See also

Task Scheduler