Listing ALL Tasks and/or Trimming Entries in Task Scheduler


  1. Posts : 4,161
    Windows 7 Pro-x64
       #1

    Listing ALL Tasks and/or Trimming Entries in Task Scheduler


    A recent thread on a Task Scheduler error got me looking at my own and looking for a way to list the scheduled tasks. Bummer. There doesn't seem to be a way to export or list them but I did find that you can display the Active tasks. (Not disabled, not expired) I would still like to find a way to list ALL tasks because over the years, I know I disabled a few I felt were extraneous at the time. And, over the years, I forgot what they were. So does anyone know a way to list all of them?

    I stumbled across another MS extra "feature" that runs every 14 days that I think is useless to me so I disabled that one too. It's called Power Efficiency Diagnostics. It analyzes power usage over a 60 second period and produces a HTML report that tries to make you feel guilty about turning on your machine. I personally don't care how much power I use when the PC is on as long as it's fast and does what I want when I want. When I'm finished using it, I turn it off and do other work. And, I think there's a better use for the 18MB of disk space it uses on my SSD.

    If you want to see your Power Efficiency report, navigate to here:
    C:\Users\All Users\Microsoft\Windows\Power Efficiency Diagnostics\energy-report.html

    Oh yeah, if you want to see all Active tasks:
    Click Start > Right Click Computer > Manage
    Expand System Tools, click on Task Schedule
    In the Center Pane, scroll to Active Tasks
      My Computer


  2. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #2

    If you don't mind 3rd party:

    CCleaner - Tools - Startup - Scheduled Tasks - Enable Advanced Mode

    Checking the list, some etries seem to be missing in CCleaner (i.e., Diagnosis-Scheduled, Customer Experience ... - KernelCeipTask/UsbCeip). Can save to text file.

    Spybot Search & Destroy has a Startup Tools module which shows Tasks as well.
      My Computer


  3. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #3

    You can get a Scheduled Task report using the schtasks command line utility.
    Open an elevated command prompt and run this command:

    schtasks /query /FO table /V > E:/ScheduledTasksList.txt

    You will need to change E:/ScheduledTasksList.txt to wherever you want the report to be saved.
      My Computer


  4. Posts : 4,161
    Windows 7 Pro-x64
    Thread Starter
       #4

    Hey, thanks guys!
    After seeing Gokhan's post, It lit up a few brain cells and I remembered that Sysinternal's AutoRun has a list that lets you jump to the entry. (Active entries have check, Disabled/Expired have empty box.)

    Found another MS "feature" that looks like it sends a copy of your Registry to Microsoft every 10 days. What's that about? Or does that URI stack a copy in the registry? Not sure what that does. And why if you have restore points? I thought the Registry was part of that.
    Disguised as Registry Idle Backup Task.

    Here's a clip of the xml.
    Code:
     
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Source>Microsoft Corporation</Source>
        <Author>Microsoft Corporation</Author>
        <Version>1.0</Version>
        <Description>Registry Idle Backup Task</Description>
        <URI>Microsoft\Windows\Registry\RegIdleBackup</URI>
        (Security descriptor removed)
      </RegistrationInfo>
      <Triggers>
        <CalendarTrigger>
          <StartBoundary>2008-01-01T00:00:00</StartBoundary>
          <Enabled>true</Enabled>
          <RandomDelay>PT1H</RandomDelay>
          <ScheduleByDay>
            <DaysInterval>10</DaysInterval>
          </ScheduleByDay>
        </CalendarTrigger>
      My Computer


  5. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #5

    I'm not sure that it sends data to MS. It looks like it just maked registry backups every 10 days. See the article here:

    r0cket's malware blog: Quick Registry Snapshot

    C:\Windows\System32\config\RegBack
      My Computer


  6. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #6

    Hey,
    carwiz said:
    I would still like to find a way to list ALL tasks [...] So does anyone know a way to list all of them?
    If you're comfortable with using PowerShell, a task like this is really trivial, however, you'll need to download the ps module I've attached to this post if you'd like to do so.


    Once you've downloaded the ps file, fire up PowerShell and import the module by dot sourcing it.
    Code:
    . "C:\Users\$env:Username\Downloads\TskSchMod.ps1"

    Now the magic happens...

    To list all tasks (including hidden ones), simply run the following line.
    Code:
    Get-Tasks (New-TaskObject '\') -IncludeHidden -Recurse | select Name
    You can instead count this list and retrieve the number of tasks that exist.
    Code:
    (Get-Tasks (New-TaskObject '\') -IncludeHidden -Recurse | select Name | measure).Count

    Some more examples -- you can also do things like...

    Get a list of all enabled tasks and their paths.
    Code:
    Get-Tasks (New-TaskObject '\') -Recurse | ?{$_.Enabled -eq $True} | select Name, Path
    Get a list of all disabled tasks, in just the \Microsoft location.
    Code:
    Get-Tasks (New-TaskObject '\Microsoft') | ?{$_.Enabled -eq $False} | select Name
    Get a list of the task paths whose task names include the word "Windows".
    Code:
    Get-Tasks (New-TaskObject '\') -IncludeHidden -Recurse | ?{$_.Name -like '*Windows*'} | select Path

    Etc., etc. By using PowerShell you can get infinity flexible as to what sort of list of tasks you require.



    carwiz said:
    I stumbled across another MS extra "feature" that runs every 14 days that I think is useless to me so I disabled that one too. It's called Power Efficiency Diagnostics.
    I tried to retrieve a list of tasks that include the word 'Power' in its task name,
    Code:
    Get-Tasks (New-TaskObject '\') -IncludeHidden -Recurse | ?{$_.Name -like '*Power*'} | select Name
    and no such task existed...?
    Listing ALL Tasks and/or Trimming Entries in Task Scheduler Attached Files
    Last edited by Pyprohly; 30 May 2015 at 23:15. Reason: Updated the Get-TaskFolder function (in the ps module) to return objects rather than strings.
      My Computer


  7. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #7

    Re: Power Efficiency Diagnostics.

    The task name is "AnalyzeSystem" - no quotes.

    Left it enabled for now. The RegistryIdle Backup task - disabled. I don't use system restore and make system image backups.
    Last edited by Callender; 30 May 2015 at 12:02. Reason: correction
      My Computer


  8. Posts : 4,161
    Windows 7 Pro-x64
    Thread Starter
       #8

    Thank you Pyprohly. Chris (Callender) is correct. I was using the folder name as you would see it in Task Scheduler. I now see where the Power Shell route would pose a problem. You would have to look up the name used in the Task to search for it. :)

    I've settled with Sysinternal's AutoRun since I already have it.
    Attached Thumbnails Attached Thumbnails Listing ALL Tasks and/or Trimming Entries in Task Scheduler-tasksched-power2.jpg  
      My Computer


  9. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #9

    carwiz said:
    I've settled with Sysinternal's AutoRun since I already have it.
    Glad you found a solution that works for you, Carwiz.

    carwiz said:
    I was using the folder name as you would see it in Task Scheduler. I now see where the Power Shell route would pose a problem. You would have to look up the name used in the Task to search for it. :)
    You may list and search by folder names too. Simply use the Get-TaskFolder function instead of Get-Tasks.

    E.g. Get a list of all task folders
    Code:
    Get-TaskFolder (New-TaskObject) -Recurse

    This is PowerShell, not batch: there's no such thing as a 'problem'.


    Callender said:
    The task name is "AnalyzeSystem" - no quotes.
    Ahh.
    Code:
    PS > Get-Tasks (New-TaskObject) -Recurse | ?{$_.Name -match 'AnalyzeSystem'} | select * -Exclude Xml
    
    
    Name               : AnalyzeSystem
    Path               : \Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem
    State              : 3
    Enabled            : True
    LastRunTime        : 13/05/2015 6:37:33 PM
    LastTaskResult     : 0
    NumberOfMissedRuns : 1
    NextRunTime        : 9/06/2015 10:30:59 AM
    Definition         : System.__ComObject
    
    
    PS > Get-TaskFolder (New-TaskObject) -Recurse | ?{$_.Name -match 'Power'}
    
    Name                                                        Path
    ----                                                        ----
    Power Efficiency Diagnostics                                \Microsoft\Windows\Power Efficiency Diagnostics
    
    
    PS >
      My Computer


 

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

© Designer Media Ltd
All times are GMT -5. The time now is 21:01.
Find Us