Skip to content

Latest commit

 

History

History
101 lines (59 loc) · 2.34 KB

registeredtask-setsecuritydescriptor.md

File metadata and controls

101 lines (59 loc) · 2.34 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
RegisteredTask.SetSecurityDescriptor method
For scripting, sets the security descriptor that is used as credentials for the registered task.
2dc10df0-5827-4199-940e-865a03a694f5
SetSecurityDescriptor method Task Scheduler
SetSecurityDescriptor method Task Scheduler , RegisteredTask object
RegisteredTask object Task Scheduler , SetSecurityDescriptor method
apiref
RegisteredTask.SetSecurityDescriptor
taskschd.dll
COM
reference
05/31/2018

RegisteredTask.SetSecurityDescriptor method

For scripting, sets the security descriptor that is used as credentials for the registered task.

Syntax

RegisteredTask.SetSecurityDescriptor( _
  ByVal sddl, _
  ByVal flags _
)

Parameters

sddl [in]

The security descriptor that is used as credentials for the registered task.

Note

If the Local System account is denied access to a task, then the Task Scheduler service can produce unexpected results.

flags [in]

Flags that specify how to set the security descriptor. The TASK_DONT_ADD_PRINCIPAL_ACE flag (0x10) from the TASK_CREATION enumeration can be specified.

Return value

This method does not return a value.

Remarks

You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

RegisteredTask

TaskFolder.GetSecurityDescriptor

RegisteredTask.SetSecurityDescriptor