Export (0) Print
Expand All

IPrincipal interface

Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal.

Members

The IPrincipal interface inherits from the IDispatch interface. IPrincipal also has these types of members:

Properties

The IPrincipal interface has these properties.

PropertyAccess typeDescription

DisplayName

Read/write

Gets or sets the name of the principal that is displayed in the Task Scheduler UI.

GroupId

Read/write

Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal.

Id

Read/write

Gets or sets the identifier of the principal.

LogonType

Read/write

Gets or sets the security logon method that is required to run the tasks that are associated with the principal.

RunLevel

Read/write

Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated with the principal.

UserId

Read/write

Gets or sets the user identifier that is required to run the tasks that are associated with the principal.

 

Remarks

When specifying an account, remember to properly use the double backslash in code to specify the domain and user name. For example, use DOMAIN\\UserName to specify a value for the UserId property.

When reading or writing XML for a task, the security credentials for a principal are specified in the Principal element of the Task Scheduler schema.

If a task is registered using the at.exe command line tool, and this interface is used to retrieve information about the task, then the LogonType property will return 0, the RunLevel property will return 0, and the UserId property will return NULL.

Examples

For more information and example code for this interface, see Time Trigger Example (C++) or Registration Trigger Example (C++).

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

Task Scheduler Interfaces
ITaskDefinition
Principal Property of ITaskDefinition

 

 

Community Additions

ADD
Show:
© 2014 Microsoft