{"record":{"id":"c3e176dbdb792e70","repo":"peass-ng/PEASS-ng","slug":"registration-triggers-are-not-available-on-task-sc","errorCode":null,"errorMessage":"Registration triggers are not available on Task Scheduler 1.0.","messagePattern":"Registration triggers are not available on Task Scheduler 1\\.0\\.","errorType":"exception","errorClass":"NotV1SupportedException","httpStatus":null,"severity":"error","filePath":"winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs","lineNumber":568,"sourceCode":"                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.\n        /// </summary>\n        /// <param name=\"sd\">The security descriptor for the folder.</param>","sourceCodeStart":550,"sourceCodeEnd":586,"githubUrl":"https://github.com/peass-ng/PEASS-ng/blob/53fb989abc2219826385683a6fee826bd6cd38d6/winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs#L550-L586","documentation":"V1 capability check in RegisterTaskDefinition: registration triggers (TaskCreation.ValidateOnly-style or trigger-registration options) are not representable in the legacy 1.0 object model, so the option throws NotV1SupportedException when the environment only provides Task Scheduler 1.0.","triggerScenarios":"Thrown at winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs:568 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove registration-trigger usage when targeting Task Scheduler 1.0","Target Task Scheduler 2.0 or later, where registration triggers are natively 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"}