Click or drag to resize
Task Scheduler Managed Class Library

TaskPrincipal Class

Provides the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTaskPrincipal

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
public sealed class TaskPrincipal : IDisposable, 
	IXmlSerializable, INotifyPropertyChanged
Request Example View Source

The TaskPrincipal type exposes the following members.

Properties
  NameDescription
Public propertyAccount
Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set.
Public propertyDisplayName
Gets or sets the name of the principal that is displayed in the Task Scheduler UI.
Public propertyGroupId
Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting this property to something other than a null or empty string, will set the UserId property to NULL and will set the LogonType property to TaskLogonType.Group;
Public propertyId
Gets or sets the identifier of the principal.
Public propertyLogonType
Gets or sets the security logon method that is required to run the tasks that are associated with the principal.
Public propertyProcessTokenSidType
Gets or sets the task process security identifier (SID) type.
Public propertyRequiredPrivileges
Gets the security credentials for a principal. These security credentials define the security context for the tasks that are associated with the principal.
Public propertyRunLevel
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.
Public propertyUserId
Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property to something other than a null or empty string, will set the GroupId property to NULL;
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by this class.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRequiresPassword
Gets a value indicating whether current Principal settings require a password to be provided.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public methodStatic memberValidateAccountForSidType
Validates the supplied account against the supplied TaskProcessTokenSidType.
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property value changes.
Top
See Also