API Reference
Class
TaskSecurity
Read and write Task Scheduler security descriptors (SDDL) for folders and tasks via COM (Schedule.Service).
Inheritance
- Object
- TaskSecurity
Methods
public static String GetFolderSddl(String computer, String folderPath) #Returns:
StringGets the DACL SDDL for a task folder (e.g., "\\" or "\\MyApp").
Parameters
- computer System.String
- folderPath System.String
Examples
var sddl = TaskSecurity.GetFolderSddl(null, "\\");
public static String GetTaskSddl(String computer, String taskPath) #Returns:
StringGets the DACL SDDL for a task (e.g., "\\MyApp\\DailyJob").
Parameters
- computer System.String
- taskPath System.String
Examples
var sddl = TaskSecurity.GetTaskSddl(null, "\\MyApp\\DailyJob");
public static Boolean SetFolderSddl(String computer, String folderPath, String sddl) #Returns:
BooleanSets the DACL SDDL for a task folder (authoritative replace of provided parts).
Parameters
- computer System.String
- folderPath System.String
- sddl System.String
Examples
TaskSecurity.SetFolderSddl(null, "\\MyApp", "D:(A;;FA;;;BA)");
public static Boolean SetTaskSddl(String computer, String taskPath, String sddl) #Returns:
BooleanSets the DACL SDDL for a task (authoritative replace of provided parts).
Parameters
- computer System.String
- taskPath System.String
- sddl System.String
Examples
TaskSecurity.SetTaskSddl(null, "\\MyApp\\DailyJob", "D:(A;;GR;;;WD)");
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object