peass-ng/PEASS-ng · error · NotV1SupportedException
This LogonType is not supported on Task Scheduler 1.0.
Error message
This LogonType is not supported on Task Scheduler 1.0.
What it means
V1 capability check in RegisterTaskDefinition: when running against Task Scheduler 1.0 (pre-Vista OS), the requested TaskCreation value (e.g. validation-only or security-related options like ValidateOnly/DontAddPrincipalAce equivalents) has no equivalent in the legacy API, so the guard throws NotV1SupportedException rather than silently mis-registering the task.
Source
Thrown at winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs:532
}
// Check for V1 invalid task names
string invChars = Regex.Escape(new string(System.IO.Path.GetInvalidFileNameChars()));
if (Regex.IsMatch(path, @"[" + invChars + @"]"))
throw new ArgumentOutOfRangeException(nameof(path), @"Task names may not include any characters which are invalid for file names.");
if (Regex.IsMatch(path, @"\.[^" + invChars + @"]{0,3}\z"))
throw new ArgumentOutOfRangeException(nameof(path), @"Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library.");
// Adds ability to set a password for a V1 task. Provided by Arcao.
TaskFlags flags = definition.v1Task.GetFlags();
if (logonType == TaskLogonType.InteractiveTokenOrPassword && string.IsNullOrEmpty(password))
logonType = TaskLogonType.InteractiveToken;
switch (logonType)
{
case TaskLogonType.Group:
case TaskLogonType.S4U:
case TaskLogonType.None:
throw new NotV1SupportedException("This LogonType is not supported on Task Scheduler 1.0.");
case TaskLogonType.InteractiveToken:
flags |= (TaskFlags.RunOnlyIfLoggedOn | TaskFlags.Interactive);
definition.v1Task.SetAccountInformation(user.Name, IntPtr.Zero);
break;
case TaskLogonType.ServiceAccount:
flags &= ~(TaskFlags.Interactive | TaskFlags.RunOnlyIfLoggedOn);
definition.v1Task.SetAccountInformation((String.IsNullOrEmpty(userId) || user.IsSystem) ? String.Empty : user.Name, IntPtr.Zero);
break;
case TaskLogonType.InteractiveTokenOrPassword:
flags |= TaskFlags.Interactive;
using (CoTaskMemString cpwd = new CoTaskMemString(password))
definition.v1Task.SetAccountInformation(user.Name, cpwd.DangerousGetHandle());
break;
case TaskLogonType.Password:
using (CoTaskMemString cpwd = new CoTaskMemString(password))
definition.v1Task.SetAccountInformation(user.Name, cpwd.DangerousGetHandle());
break;
default:View on GitHub (pinned to 53fb989abc)
Solutions
- Use only TaskCreation.Create, CreateOrUpdate, Disable or Update when targeting Task Scheduler 1.0
- Require or target Task Scheduler 2.0+ (Vista/Server 2008 and later) for advanced creation options
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs:532 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/730b2fa0eb0ab420.
Report an issue: GitHub.