{"record":{"id":"273211798a5e4d5c","repo":"peass-ng/PEASS-ng","slug":"security-settings-are-not-available-on-task-schedu","errorCode":null,"errorMessage":"Security settings are not available on Task Scheduler 1.0.","messagePattern":"Security settings are not available on Task Scheduler 1\\.0\\.","errorType":"exception","errorClass":"NotV1SupportedException","httpStatus":null,"severity":"error","filePath":"winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs","lineNumber":566,"sourceCode":"                        definition.v1Task.SetAccountInformation(user.Name, cpwd.DangerousGetHandle());\n                    break;\n                default:\n                    throw new ArgumentOutOfRangeException(nameof(logonType), logonType, null);\n            }\n            definition.v1Task.SetFlags(flags);\n\n            switch (createType)\n            {\n                case TaskCreation.Create:\n                case TaskCreation.CreateOrUpdate:\n                case TaskCreation.Disable:\n                case TaskCreation.Update:\n                    if (createType == TaskCreation.Disable)\n                        definition.Settings.Enabled = false;\n                    definition.V1Save(path);\n                    break;\n                case TaskCreation.DontAddPrincipalAce:\n                    throw new NotV1SupportedException(\"Security settings are not available on Task Scheduler 1.0.\");\n                case TaskCreation.IgnoreRegistrationTriggers:\n                    throw new NotV1SupportedException(\"Registration triggers are not available on Task Scheduler 1.0.\");\n                case TaskCreation.ValidateOnly:\n                    throw new NotV1SupportedException(\"XML validation not available on Task Scheduler 1.0.\");\n                default:\n                    throw new ArgumentOutOfRangeException(nameof(createType), createType, null);\n            }\n            return new Task(TaskService, definition.v1Task);\n        }\n\n        /// <summary>\n        /// Applies access control list (ACL) entries described by a <see cref=\"TaskSecurity\"/> object to the file described by the current <see cref=\"TaskFolder\"/> object.\n        /// </summary>\n        /// <param name=\"taskSecurity\">A <see cref=\"TaskSecurity\"/> object that describes an access control list (ACL) entry to apply to the current folder.</param>\n        public void SetAccessControl([NotNull] TaskSecurity taskSecurity) { taskSecurity.Persist(this); }\n\n        /// <summary>\n        /// Sets the security descriptor for the folder. Not available to Task Scheduler 1.0.","sourceCodeStart":548,"sourceCodeEnd":584,"githubUrl":"https://github.com/peass-ng/PEASS-ng/blob/53fb989abc2219826385683a6fee826bd6cd38d6/winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs#L548-L584","documentation":"V1 capability check inside RegisterTaskDefinition's createType switch: TaskCreation.DontAddPrincipalAce (and similar security-descriptor options) rely on SDDL-based security settings that the legacy Task Scheduler 1.0 API does not expose, so a NotV1SupportedException is thrown instead of registering with ignored security settings.","triggerScenarios":"Thrown at winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs:566 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register with TaskCreation.Create or CreateOrUpdate on V1 and adjust the .job file security outside the API","Run on Task Scheduler 2.0+ where SDDL security settings are supported"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53fb989abc2219826385683a6fee826bd6cd38d6","analyzedAt":"2026-09-02T04:25:09.259Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}