πŸ‡¬πŸ‡§ | πŸ‡©πŸ‡ͺ | πŸ‡«πŸ‡· | πŸ‡ͺπŸ‡Έ | πŸ‡¨πŸ‡³ | πŸ‡ΈπŸ‡¦
We don't have DLL but we have:
Windows File Analyzer & Online Fast Antivirus

A minimalist interface featuring quick search, convenient uploading, and a clean section structure.

πŸ›‘οΈπŸ” Fast verify your file, just drop on this page.
Virus check, hashes, sign verify, architecture, AI info.

How to fix "The expiration time specified for enumeration was invalid. Specify the expiration time as a duration."

The error "The expiration time specified for enumeration was invalid. Specify the enumeration time as a duration." occurs when Windows tries to process a corrupted or misconfigured scheduled task, often linked to Windows Update, system maintenance, or third-party backup software that uses an invalid time format in its task XML schema.

Cause of the Error

Windows Task Scheduler relies on strict XML schemas to run tasks. When a task specifies an expiration or duration limit, it must use the ISO 8601 duration format (for example, PT1H for 1 hour). If a system update, application installer, or disk corruption alters this value to a standard date/time or an invalid string, the Task Scheduler engine fails to enumerate the tasks and throws this error.


Step-by-Step Fixes

Method 1: Repair Corrupted Tasks via Command Prompt

The quickest way to resolve enumeration errors is to let Windows automatically detect and repair the Task Scheduler database.

  1. Click the Start menu, type cmd, right-click Command Prompt, and select Run as administrator.
  2. Type the following command to check the integrity of your Windows component store and press Enter:
    DISM.exe /Online /Cleanup-image /Restorehealth
  3. Wait for the process to reach 100% (this may take several minutes).
  4. Next, type the following command to scan and repair protected system files, then press Enter:
    sfc /scannow
  5. Once the scan completes, restart your computer and check if the error persists.

Method 2: Identify and Delete the Invalid Task manually

If the automated scans do not fix the issue, you must locate the specific XML file causing the enumeration block.

  1. Press Windows Key + R to open the Run dialog box.
  2. Type taskschd.msc and press Enter to open the Task Scheduler.
  3. Expand the Task Scheduler Library folder on the left panel and click through the subfolders (such as Microsoft -> Windows).
  4. Look for a popup error message that triggers when you click a specific folder. Note the name of the folder or task mentioned in the error.
  5. If the Task Scheduler interface crashes or refuses to show the name, open File Explorer and navigate to the following hidden system directory: C:\Windows\System32\Tasks
  6. Sort the files by Date modified to see recent changes, or copy the files out of this folder in small batches to a temporary backup folder on your Desktop.
  7. Re-open Task Scheduler after moving a batch. If the error disappears, the invalid task is inside the batch you just moved.
  8. Delete the problematic task file from the C:\Windows\System32\Tasks directory permanently.

Method 3: Fix the Invalid Duration in Registry Editor

If you know which application or task is causing the issue but do not want to delete it, you can correct the duration format in the Windows Registry.

  1. Press Windows Key + R, type regedit, and press Enter to open the Registry Editor.
  2. Navigate to the following path: HKEY LOCAL MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks
  3. Click through the GUID subkeys (the long numbers in brackets) and look at the Path value on the right pane to find the matching name of the corrupted task.
  4. Once found, look for a value named Triggers or DynamicInfo.
  5. If you are comfortable editing XML data, you can export the key, locate the <Maintain> or <DeletionDelay> tag, and change the invalid time string to a proper duration format like PT0S (zero seconds) or P1D (one day).
  6. Alternatively, right-click the main GUID key of the broken task in the left pane and select Delete.
  7. Restart your computer to apply the changes.

ERROR_WSMAN_ENDPOINT_UNAVAILABLE_INVALID_VALUE | ERROR_WSMAN_INVALID_HEADER | ERROR_WSMAN_MAX_ELEMENTS_NOT_SUPPORTED | ERROR_WSMAN_WMI_PROVIDER_INVALID_PARAMETER | ERROR_WSMAN_CLIENT_MULTIPLE_ENUM_MODE_FLAGS

There may be some errors. Learn Microsoft