UserId (principalType) Element

Specifies the user identifier required to run those tasks associated with the principal.

<xs:element name="UserId"
    type="nonEmptyString"
 />

The UserId element is defined by the principalType complex type.

Parent element

Element Derived from Description
Principal principalType Specifies the security credentials for a principal.

Remarks

The UserId element and the LogonType element are used together to define the user required to run those tasks that use this principal.

You cannot specify a user identifier and a group identifier at the same time. Specify either the UserId or the GroupId element, but not both.

For scripting development, the user identifier is specified using the Principal.UserId property.

For C++ development, the user identifier is specified using the IPrincipal::UserId property.

Examples

The following XML defines a principle using a user identifier.

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

Requirements

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

See also

Task Scheduler