View All Automatic Maintenance Tasks in Windows 10  

Page 1 of 2 12 LastLast
    View All Automatic Maintenance Tasks in Windows 10

    View All Automatic Maintenance Tasks in Windows 10

    How to View All Automatic Maintenance Tasks in Windows 10
    Published by Category: Performance & Maintenance
    30 Sep 2020
    Designer Media Ltd



    How to View All Automatic Maintenance Tasks in Windows 10


    Maintenance activity refers to an application or process that helps maintain the health and performance of a Windows PC. Maintenance includes keeping Windows and applications up-to-date, checking security, and running scans for malware. Windows Automatic Management (WAM) is a set of enhancements to the Task Scheduler API you can use to link your applications into the Windows maintenance schedule. Specifically, WAM allows you to add activities that require regular scheduling, but do not have exact time requirements. Instead, WAM relies on the operating system to choose the appropriate time to activate the task throughout the day. The system chooses those times based on minimal impact to the user, PC performance, and energy efficiency.

    How Scheduled Maintenance Works

    Windows Automatic Maintenance minimizes impact to the PC by scheduling maintenance only when the PC is on and idle. By default, the system performs maintenance daily, starting at 3 AM. (Note that the user may re-schedule when the maintenance occurs.) This daily session is limited to a maximum duration of 1 hour per attempt. If the user is actively using the machine, the system defers maintenance until a later time. The system also suspends any executing maintenance task if the user returns to the PC.

    The system restarts a suspended maintenance task during the next idle period; however, the system will not suspend any task marked as critical. Instead, the system allows a critical task to complete, regardless of user action.

    Due to the nature of scheduling, some scheduled tasks may not finish: perhaps there are too many scheduled events to fit in the 1 hour maintenance window, or maybe the computer was simply not turned on. In such cases, you can define a task with a deadline. A deadline is defined as a recurring time frame in which the system must successfully perform the task at least once.

    If a task misses a deadline, the maintenance scheduler will continue to attempt to execute the task during the maintenance window. Further, the scheduler will not limit itself to the regular 1 hour time limit. Instead, the scheduler extends the duration of the maintenance window in order to complete the delayed task. If the system still cannot complete the task, the Action Center displays a warning notification to the user. The user can then manually initiate the maintenance action from the Action center.

    Once the system completes the task (even with a failure error code), the attempt is considered successful. After a successful attempt, the scheduler resets to the regular maintenance schedule, and will attempt the task during the next period.

    See also: Automatic Maintenance | Microsoft Docs

    This tutorial will show you how to view a list of all automatic maintenance tasks in Windows 10.



    Here's How:

    1 Open PowerShell.

    2 Copy and paste the command below you want to use into PowerShell, and press Enter.

    (Outputs to interactive table in a separate window like screenshots below step 3.)
    Get-ScheduledTask | ? {$_.Settings.MaintenanceSettings} | Out-GridView

    OR

    (Outputs to "MaintenanceTasks.txt" file on your desktop.)
    Get-ScheduledTask | ? {$_.Settings.MaintenanceSettings} | Format-Table -AutoSize | Out-file -FilePath "$Env:userprofile\Desktop\MaintenanceTasks.txt"

    View All Automatic Maintenance Tasks in Windows 10-automatic_maintenance_tasks-1.jpg

    3 You will now see a list of all automatic maintenance tasks including their TaskPath, TaskName, and current State in Task Scheduler (taskschd.msc). (see screenshots below)

    View All Automatic Maintenance Tasks in Windows 10-automatic_maintenance_tasks-2.jpg View All Automatic Maintenance Tasks in Windows 10-automatic_maintenance_tasks-3.jpg


    That's it,
    Shawn






  1. Posts : 144
    Windows 10 Pro x64
       #1

    Greets,

    Thanks for the trick & information!

    Just to mention what came helpful to me when I wanted to keep a close watch. I got the output as a text file using the Powershell Command :

    Code:
    Get-ScheduledTask | ? {$_.Settings.MaintenanceSettings} | Out-file -FilePath F:\MaintenanceTask.txt

    & I got the file MaintenanceTask.txt created in the root of F: partition.

    Thanks. ...
      My Computer


  2. Posts : 64,536
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    Vineet Garg said:
    Greets,

    Thanks for the trick & information!

    Just to mention what came helpful to me when I wanted to keep a close watch. I got the output as a text file using the Powershell Command :

    Code:
    Get-ScheduledTask | ? {$_.Settings.MaintenanceSettings} | Out-file -FilePath F:\MaintenanceTask.txt

    & I got the file MaintenanceTask.txt created in the root of F: partition.

    Thanks. ...
    Thank you. I now added an output to .txt file option command to the tutorial.
      My Computers


  3. Posts : 144
    Windows 10 Pro x64
       #3

    Greets,



    Thanks for the advanced command :

    Code:
    Get-ScheduledTask | ? {$_.Settings.MaintenanceSettings} | Format-Table -AutoSize | Out-file -FilePath "$Env:userprofile\Desktop\MaintenanceTasks.txt"

    Thanks. ...
      My Computer


  4. Posts : 64,536
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    Vineet Garg said:
    Greets,



    Thanks. ...
      My Computers


  5. Posts : 14,300
    Windows 10 Home x64 Version 22H2 Build 19045.2728
       #5

    I suggest that a csv output is much, much easier to work with.
    I also suggest that the code could usefully be adjusted to be able to cope with a relocated Desktop folder path.

    Le voila -

    ListAutoMaintenanceTasks.ps1
    Code:
    $UserDesktop = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Desktop").Desktop
    Get-ScheduledTask |
         ? {$_.Settings.MaintenanceSettings} |
             Export-CSV -Path "$UserDesktop\ListAutoMaintenanceTasks.csv" -NoTypeInformation
    - This code creates a ListAutoMaintenanceTasks.csv on the user Desktop that can be opened in, for example, Excel with everything arranged neatly in separate fields-columns.
    - The code can cope with a user Desktop folder that has been relocated
    - The code can cope with spaces and ampersands in the username [just in case Tom & Jerry share a computer]



    This version is a bit neater in that it controls which properties are listed

    ListAutoMaintenanceTasks-SelectiveOutput.ps1
    Code:
    $UserDesktop = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Desktop").Desktop
    Get-ScheduledTask |
         ? {$_.Settings.MaintenanceSettings} |
    ### These property selections are optional and can be changed to suit needs.  Run this without the Select-Object line to see the full range of properties that can be included
            Select-Object "TaskPath", "TaskName", "State" |
             Export-CSV -Path "$UserDesktop\ListAutoMaintenanceTasks.csv" -NoTypeInformation


    All the best,
    Denis
    Last edited by Try3; 30 Sep 2020 at 23:25.
      My Computer


  6. Posts : 190
    Windows 10, 22H2 10.0.19045
       #6

    This may be one of those "Too much information . . . " things. I tried one of the PowerShell cmds posted by Try3, and ended up wondering why some maintenance items marked as "Critical" were also marked "disabled." This may be one of those cruel MS ploys (Event Viewer comes to mind) that will keep users (OK, not all users, just us special, stay up at night tinkering, worrying type users) wondering if their systems are up to date.

    View All Automatic Maintenance Tasks in Windows 10-image.png
      My Computer


  7. Posts : 56,485
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #7

    Homer712 said:
    This may be one of those "Too much information . . . " things. I tried one of the PowerShell cmds posted by Try3, and ended up wondering why some maintenance items marked as "Critical" were also marked "disabled." This may be one of those cruel MS ploys (Event Viewer comes to mind) that will keep users (OK, not all users, just us special, stay up at night tinkering, worrying type users) wondering if their systems are up to date. View All Automatic Maintenance Tasks in Windows 10-image.png
    The .Net on your pic caught my eye. We're up to .Net 4.8 now I believe. Notice,the "critical" is part of the description, not a separate column. It may be disabled because .Net 4.0 does not exist on this user machine. Unfortunately, it's still going to "read" critical" because of a poor decision on MS's part to using that wording.

    Code:
    TaskPath                                                    TaskName                                      State   
    --------                                                    --------                                      -----   
    \Microsoft\Windows\.NET Framework\                          .NET Framework NGEN v4.0.30319                Ready   
    \Microsoft\Windows\.NET Framework\                          .NET Framework NGEN v4.0.30319 64             Ready   
    \Microsoft\Windows\.NET Framework\                          .NET Framework NGEN v4.0.30319 64 Critical    Disabled
    \Microsoft\Windows\.NET Framework\                          .NET Framework NGEN v4.0.30319 Critical       Disabled
    \Microsoft\Windows\Application Experience\                  ProgramDataUpdater                            Ready   
    \Microsoft\Windows\Application Experience\                  StartupAppTask                                Ready   
    \Microsoft\Windows\ApplicationData\                         appuriverifierdaily                           Ready   
    \Microsoft\Windows\ApplicationData\                         CleanupTemporaryState                         Ready   
    \Microsoft\Windows\ApplicationData\                         DsSvcCleanup                                  Ready   
    \Microsoft\Windows\AppxDeploymentClient\                    Pre-staged app cleanup                        Disabled
    \Microsoft\Windows\BrokerInfrastructure\                    BgTaskRegistrationMaintenanceTask             Ready   
    \Microsoft\Windows\Chkdsk\                                  ProactiveScan                                 Ready   
    \Microsoft\Windows\Customer Experience Improvement Program\ UsbCeip                                       Ready   
    \Microsoft\Windows\Defrag\                                  ScheduledDefrag                               Disabled
    \Microsoft\Windows\Device Setup\                            Metadata Refresh                              Ready   
    \Microsoft\Windows\Diagnosis\                               Scheduled                                     Ready   
    \Microsoft\Windows\DiskCleanup\                             SilentCleanup                                 Ready   
    \Microsoft\Windows\DiskDiagnostic\                          Microsoft-Windows-DiskDiagnosticDataCollector Ready   
    \Microsoft\Windows\DiskFootprint\                           Diagnostics                                   Ready   
    \Microsoft\Windows\DiskFootprint\                           StorageSense                                  Ready   
    \Microsoft\Windows\Feedback\Siuf\                           DmClient                                      Ready   
    \Microsoft\Windows\FileHistory\                             File History (maintenance mode)               Ready   
    \Microsoft\Windows\Flighting\FeatureConfig\                 UsageDataReporting                            Ready   
    \Microsoft\Windows\HelloFace\                               FODCleanupTask                                Ready   
    \Microsoft\Windows\InstallService\                          ScanForUpdatesAsUser                          Ready   
    \Microsoft\Windows\LanguageComponentsInstaller\             Uninstallation                                Disabled
    \Microsoft\Windows\License Manager\                         TempSignedLicenseExchange                     Ready   
    \Microsoft\Windows\Maintenance\                             WinSAT                                        Ready   
    \Microsoft\Windows\MemoryDiagnostic\                        RunFullMemoryDiagnostic                       Ready   
    \Microsoft\Windows\MUI\                                     LPRemove                                      Ready   
    \Microsoft\Windows\PI\                                      Sqm-Tasks                                     Ready   
    \Microsoft\Windows\Power Efficiency Diagnostics\            AnalyzeSystem                                 Ready   
    \Microsoft\Windows\RecoveryEnvironment\                     VerifyWinRE                                   Disabled
    \Microsoft\Windows\Registry\                                RegIdleBackup                                 Ready   
    \Microsoft\Windows\Servicing\                               StartComponentCleanup                         Ready   
    \Microsoft\Windows\SettingSync\                             BackgroundUploadTask                          Ready   
    \Microsoft\Windows\SharedPC\                                Account Cleanup                               Disabled
    \Microsoft\Windows\Shell\                                   IndexerAutomaticMaintenance                   Ready   
    \Microsoft\Windows\StateRepository\                         MaintenanceTasks                              Ready   
    \Microsoft\Windows\Sysmain\                                 HybridDriveCachePrepopulate                   Disabled
    \Microsoft\Windows\Sysmain\                                 HybridDriveCacheRebalance                     Disabled
    \Microsoft\Windows\Sysmain\                                 ResPriStaticDbSync                            Ready   
    \Microsoft\Windows\Sysmain\                                 WsSwapAssessmentTask                          Ready   
    \Microsoft\Windows\SystemRestore\                           SR                                            Ready   
    \Microsoft\Windows\Time Synchronization\                    SynchronizeTime                               Ready   
    \Microsoft\Windows\Time Zone\                               SynchronizeTimeZone                           Ready   
    \Microsoft\Windows\UpdateOrchestrator\                      Maintenance Install                           Disabled
    \Microsoft\Windows\UpdateOrchestrator\                      Report policies                               Ready   
    \Microsoft\Windows\Windows Defender\                        Windows Defender Cache Maintenance            Ready   
    \Microsoft\Windows\Windows Defender\                        Windows Defender Cleanup                      Ready   
    \Microsoft\Windows\Windows Defender\                        Windows Defender Scheduled Scan               Ready   
    \Microsoft\Windows\Windows Defender\                        Windows Defender Verification                 Ready   
    \Microsoft\Windows\WOF\                                     WIM-Hash-Validation                           Ready
      My Computers


  8. Posts : 190
    Windows 10, 22H2 10.0.19045
       #8

    Seems to be???

    View All Automatic Maintenance Tasks in Windows 10-image.png
      My Computer


  9. Posts : 56,485
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #9

    Homer712 said:
    Seems to be???

    View All Automatic Maintenance Tasks in Windows 10-image.png
    You mean the 4.0? Yeah I see it. I was really only trying to explain away the "Critical" wording in the description.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 02:53.
Find Us




Windows 10 Forums