peass-ng/PEASS-ng · warning · NotSupportedPriorToException
NotSupportedPriorToException
Error message
NotSupportedPriorToException
What it means
NotSupportedPriorToException signals that a property introduced in Task Scheduler 2.1 (Windows 7/Server 2008 R2) is being used on a task running on an older engine. UseUnifiedSchedulingEngine requires v2Settings2 (V2.1) or v2Settings3 (V2.2); when neither interface is available the setter throws with TaskCompatibility.V2_1. The library enforces minimum OS/compatibility versions per property.
Source
Thrown at winPEAS/winPEASexe/winPEAS/TaskScheduler/Task.cs:3487
[XmlIgnore]
public bool UseUnifiedSchedulingEngine
{
get
{
if (v2Settings2 != null)
return v2Settings2.UseUnifiedSchedulingEngine;
if (v2Settings3 != null)
return v2Settings3.UseUnifiedSchedulingEngine;
return false;
}
set
{
if (v2Settings2 != null)
v2Settings2.UseUnifiedSchedulingEngine = value;
else if (v2Settings3 != null)
v2Settings3.UseUnifiedSchedulingEngine = value;
else
throw new NotSupportedPriorToException(TaskCompatibility.V2_1);
OnNotifyPropertyChanged();
}
}
/// <summary>Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts.</summary>
/// <exception cref="NotSupportedPriorToException">Property set for a task on a Task Scheduler version prior to 2.2.</exception>
[DefaultValue(false)]
[XmlIgnore]
public bool Volatile
{
get => v2Settings3 != null && v2Settings3.Volatile;
set
{
if (v2Settings3 != null)
v2Settings3.Volatile = value;
else
throw new NotSupportedPriorToException(TaskCompatibility.V2_2);
OnNotifyPropertyChanged();View on GitHub (pinned to 53fb989abc)
Solutions
- Verify the target machine/TaskScheduler supports V2_1 (Windows 7 / Server 2008 R2 or newer) before setting the property
- Set the TaskDefinition's Compatibility to TaskCompatibility.V2_1 or higher so the V2.1 settings interface is created
- Guard the assignment with a version/compatibility check and skip the property on older systems
- Catch NotSupportedPriorToException and degrade gracefully if the setting is optional
Example fix
// before
task.Definition.Settings.UseUnifiedSchedulingEngine = true;
// after
if (task.Definition.Settings.Compatibility >= TaskCompatibility.V2_1)
task.Definition.Settings.UseUnifiedSchedulingEngine = true;
else
Log("UseUnifiedSchedulingEngine requires Task Scheduler 2.1+"); Defensive patterns
Strategy: validation
Validate before calling
if (def.Settings.Compatibility < TaskCompatibility.V2_1) { Log("Requires TS 2.1"); return; }
def.Settings.UseUnifiedSchedulingEngine = true; Type guard
bool SupportsV2_1(TaskDefinition def) => def != null && def.Settings.Compatibility >= TaskCompatibility.V2_1;
Try / catch
try { def.Settings.UseUnifiedSchedulingEngine = v; } catch (NotSupportedPriorToException) { Log("Requires Win7+/TS 2.1"); } Prevention
- Confirm OS baseline (Win7/2008R2+) before using 2.1 features
- Keep task definitions at Compatibility >= V2_1 when using unified scheduling
- Feature-detect rather than assume when managing remote machines
When it happens
Trigger: Setting Task.Settings.UseUnifiedSchedulingEngine on a task whose underlying settings object is only V2.0 or V1 — i.e. running on Windows Vista/Server 2008 or earlier, or on a task definition whose Compatibility is below V2_1.
Common situations: Managing scheduled tasks remotely on pre-Win7 machines; a codebase written for Win7+ deployed to Server 2008; copying a task definition that uses the unified scheduling engine to an older host.
Related errors
- A maximum of 32 actions is allowed within a single task.
- Attachments array cannot contain more than 8 items.
- Each value of the array must contain a valid file reference.
- Under Windows 8 and later, EmailAction objects are converted
- Index is not a valid index in the ActionCollection
AI-assisted analysis of peass-ng/PEASS-ng@53fb989abc (2026-09-02).
Data as JSON: /api/errors/ee2b1908166ae41d.
Report an issue: GitHub.