Attempting to tame Scheduled Tasks in W10-21H2

Discussion in 'Windows 10' started by laffin_boy, Jul 30, 2024.

  1. laffin_boy

    laffin_boy MDL Novice

    Feb 15, 2009
    9
    0
    0
    #1 laffin_boy, Jul 30, 2024
    Last edited: Jul 30, 2024
    MDL newbie here.

    i'm configuring a newly installed, "slimmed-down" copy of W10-Iot-LTSC-21. Attempting to neuter or eliminate some of the bloat from Scheduled Tasks. And because I want to install this same OS configuration to my laptop I attempted to semi-automate this cleanup with a cmd file:

    :: Delete these files & folders
    schtasks /delete /tn "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /f
    schtasks /delete /tn "\Microsoft\Windows\Application Experience\PcaPatchDbTask" /f
    schtasks /delete /tn "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /f
    schtasks /delete /tn "\Microsoft\Windows\Application Experience\StartupAppTask" /f
    schtasks /delete /tn "\Microsoft\Windows\Application Experience" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /f
    schtasks /delete /tn "\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticResolver" /f
    schtasks /delete /tn "\Microsoft\Windows\DiskDiagnostic" /f
    :: -------------
    schtasks /delete /tn "\Microsoft\Windows\Feedback\Siuf\DmClient" /f
    schtasks /delete /tn "\Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" /f
    schtasks /delete /tn "\Microsoft\Windows\Feedback\Siuf" /f
    schtasks /delete /tn "\Microsoft\Windows\Feedback" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Feedback\File History\File History (maintenance mode)" /f
    schtasks /delete /tn "\Microsoft\Windows\Feedback\File History" /f
    :: -------------
    schtasks /delete /tn "\Microsoft\Windows\Flighting\FeatureConfig\ReconcileFeatures" /f
    schtasks /delete /tn "\Microsoft\Windows\Flighting\FeatureConfig\UsageDataFlushing" /f
    schtasks /delete /tn "\Microsoft\Windows\Flighting\FeatureConfig\UsageDataReporting" /f
    schtasks /delete /tn "\Microsoft\Windows\Flighting\FeatureConfig" /f
    schtasks /delete /tn "\Microsoft\Windows\Flighting\Flighting\OneSettings\ResetCache" /f
    schtasks /delete /tn "\Microsoft\Windows\Flighting\Flighting\OneSettings" /f
    schtasks /delete /tn "\Microsoft\Windows\Flighting" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Hello Face\FODCleanupTask" /f
    schtasks /delete /tn "\Microsoft\Windows\Hello Face" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Input\LocalUserSyncDataAvailable" /f
    schtasks /delete /tn "\Microsoft\Windows\Input\MouseSyncDataAvailable" /f
    schtasks /delete /tn "\Microsoft\Windows\Input\PenSyncDataAvailable" /f
    schtasks /delete /tn "\Microsoft\Windows\Input\TouchpadSyncDataAvailable" /f
    schtasks /delete /tn "\Microsoft\Windows\Input" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\International\Synchronize Language Settings" /f
    schtasks /delete /tn "\Microsoft\Windows\International" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Language Components Installer\Installation" /f
    schtasks /delete /tn "\Microsoft\Windows\Language Components Installer\ReconcileLanguageResources" /f
    schtasks /delete /tn "\Microsoft\Windows\Language Components Installer\Uninstallation" /f
    schtasks /delete /tn "\Microsoft\Windows\Language Components Installer" /f
    :: -------------
    schtasks /delete /tn "\Microsoft\Windows\Live\Roaming" /f
    schtasks /delete /tn "\Microsoft\Windows\Live" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\MUI\LPRemove" /f
    schtasks /delete /tn "\Microsoft\Windows\MUI" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\PI\Secure-Boot-Update" /f
    schtasks /delete /tn "\Microsoft\Windows\PI\Sqm-Tasks" /f
    schtasks /delete /tn "\Microsoft\Windows\PI" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\PLA\System" /f
    schtasks /delete /tn "\Microsoft\Windows\PLA" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Recovery Environment\VerifyWinRE" /f
    schtasks /delete /tn "\Microsoft\Windows\Recovery Environment" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Sync Ctr" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\System Restore\SR" /f
    schtasks /delete /tn "\Microsoft\Windows\System Restore" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Task Scheduler" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\TPM\Tpm-HASCertRetr" /f
    schtasks /delete /tn "\Microsoft\Windows\TPM" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Windows Activation Technologies" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Windows Media Sharing" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Windows Subsystem for Linux" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Windows Backup" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Work Folders" /f
    :: ------------
    schtasks /delete /tn "\Microsoft\Windows\Workplace Join\Automatic-Device-Join" /f
    schtasks /delete /tn "\Microsoft\Windows\Workplace Join\Device-Sync" /f
    schtasks /delete /tn "\Microsoft\Windows\Workplace Join\Recovery-Sync" /f
    schtasks /delete /tn "\Microsoft\Windows\Workplace Join" /f
    :: -----------
    :: Folders & Files below are disabled
    :: ----------
    schtasks /change /disable /tn "\Microsoft\Windows\Defrag\ScheduledDefrag"
    :: -----------
    schtasks /change /disable /tn "\Microsoft\Windows\EDP\EDP App Launch Task"
    schtasks /change /disable /tn "\Microsoft\Windows\EDP\EDP Auth Task"
    schtasks /change /disable /tn "\Microsoft\Windows\EDP\EDP Inaccessible Credentials Task"
    schtasks /change /disable /tn "\Microsoft\Windows\EDP\StorageCardEncryption Task"
    :: ------------
    schtasks /change /disable /tn "\Microsoft\Windows\License Manager\TempSignedLicenseExchange"
    :: ------------
    schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan"
    schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker"

    Because ST had already blocked me from deleting some empty folders I used nSudo to elevate cmd.exe to Trusted Installer in order to run this script. Even so the process generated "access denied" errors on 8 of the individual tasks plus 3 empty folders!

    Here's the errors:
    RAN CMD AS TRUSTED INST - STILL GOT ERRORS ON 8 TASKS & 3 EMPTY FOLDERS

    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\Application Experience" /f
    ERROR: Access is denied. [DELETED NONE OF 4 TASKS]

    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\Flighting" /f
    ERROR: Access is denied. [DELETED ALL 3 OF "FEATURE CONFIG" TASKS BUT NONE OF "ONE SETTINGS"]

    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\Live\Roaming" /f
    ERROR: Access is denied. [COULDN'T DELETE THE SINGLE TASK]


    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\PLA\System" /f
    ERROR: Access is denied. [COULDN'T DELETE EMPTY FOLDER]


    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\TPM" /f
    ERROR: Access is denied. [COULDN'T DELETE THE SINGLE (disabled) TASK]

    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\Windows Activation Technologies" /f
    ERROR: Access is denied. [COULDN'T DELETE EMPTY FOLDER]

    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\Windows Subsystem for Linux" /f
    ERROR: Access is denied. [COULDN'T DELETE EMPTY FOLDER]

    F:\System\Sys_Util\NSudo>schtasks /delete /tn "\Microsoft\Windows\Workplace Join" /f
    ERROR: Access is denied. [DELETED 2 OF TASKS BUT NOT (disabled) 3RD"]

    NOTE: ALL OF THESE FOLDERS ^ ARE MISSING FROM C:\Windows\System32\Tasks\Microsoft\Windows !!

    ++++++++++++++++++++++++++++++++++++++++

    F:\System\Sys_Util\NSudo>schtasks /change /disable /tn "\Microsoft\Windows\EDP\EDP App Launch Task"
    ERROR: The system cannot find the path specified.

    F:\System\Sys_Util\NSudo>schtasks /change /disable /tn "\Microsoft\Windows\EDP\EDP Auth Task"
    ERROR: The system cannot find the path specified.

    F:\System\Sys_Util\NSudo>schtasks /change /disable /tn "\Microsoft\Windows\EDP\EDP Inaccessible Credentials Task"
    ERROR: The system cannot find the path specified.

    F:\System\Sys_Util\NSudo>schtasks /change /disable /tn "\Microsoft\Windows\EDP\StorageCardEncryption Task"
    ERROR: The system cannot find the path specified.

    F:\System\Sys_Util\NSudo>schtasks /change /disable /tn "\Microsoft\Windows\License Mgr\TempSignedLicenseExchange"
    ERROR: The specified task name "\Microsoft\Windows\License Mgr\TempSignedLicenseExchange" does not exist in the system.
    FIXED - MGR S/B MANAGER

    So how can I figure out what's protecting these few tasks / folders?
     
  2. David Manaia

    David Manaia MDL Novice

    Jan 15, 2022
    2
    1
    0
    Try checking the task properties, folder permissions, and the Event Log for clues. You can also use Process Monitor to see what's going on behind the scenes. And, just in case, check if any third-party software is getting in the way.