peass-ng/PEASS-ng · error · NotV1SupportedException
Registration triggers are not available on Task Scheduler 1.
Error message
Registration triggers are not available on Task Scheduler 1.0.
What it means
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.
Source
Thrown at winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs:568
default:
throw new ArgumentOutOfRangeException(nameof(logonType), logonType, null);
}
definition.v1Task.SetFlags(flags);
switch (createType)
{
case TaskCreation.Create:
case TaskCreation.CreateOrUpdate:
case TaskCreation.Disable:
case TaskCreation.Update:
if (createType == TaskCreation.Disable)
definition.Settings.Enabled = false;
definition.V1Save(path);
break;
case TaskCreation.DontAddPrincipalAce:
throw new NotV1SupportedException("Security settings are not available on Task Scheduler 1.0.");
case TaskCreation.IgnoreRegistrationTriggers:
throw new NotV1SupportedException("Registration triggers are not available on Task Scheduler 1.0.");
case TaskCreation.ValidateOnly:
throw new NotV1SupportedException("XML validation not available on Task Scheduler 1.0.");
default:
throw new ArgumentOutOfRangeException(nameof(createType), createType, null);
}
return new Task(TaskService, definition.v1Task);
}
/// <summary>
/// Applies access control list (ACL) entries described by a <see cref="TaskSecurity"/> object to the file described by the current <see cref="TaskFolder"/> object.
/// </summary>
/// <param name="taskSecurity">A <see cref="TaskSecurity"/> object that describes an access control list (ACL) entry to apply to the current folder.</param>
public void SetAccessControl([NotNull] TaskSecurity taskSecurity) { taskSecurity.Persist(this); }
/// <summary>
/// Sets the security descriptor for the folder. Not available to Task Scheduler 1.0.
/// </summary>
/// <param name="sd">The security descriptor for the folder.</param>View on GitHub (pinned to 53fb989abc)
Solutions
- Remove registration-trigger usage when targeting Task Scheduler 1.0
- Target Task Scheduler 2.0 or later, where registration triggers are natively supported
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs:568 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of peass-ng/PEASS-ng@53fb989abc (2026-09-02).
Data as JSON: /api/errors/c3e176dbdb792e70.
Report an issue: GitHub.