Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Listing ALL Tasks and/or Trimming Entries in Task Scheduler

29 May 2015   #1
carwiz

Windows 7 Pro-x64
 
 
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 System SpecsSystem Spec
.
30 May 2015   #2
GokAy

Windows 7 Ultimate x64 SP1
 
 

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 System SpecsSystem Spec
30 May 2015   #3
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

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 System SpecsSystem Spec
.

30 May 2015   #4
carwiz

Windows 7 Pro-x64
 
 

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 System SpecsSystem Spec
30 May 2015   #5
Callender

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

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 System SpecsSystem Spec
30 May 2015   #6
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Hey,
Quote   Quote: Originally Posted by carwiz View Post
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.



Quote   Quote: Originally Posted by carwiz View Post
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...?


Attached Files
File Type: ps1 TskSchMod.ps1 (1.7 KB, 7 views)
My System SpecsSystem Spec
30 May 2015   #7
Callender

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

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.
My System SpecsSystem Spec
30 May 2015   #8
carwiz

Windows 7 Pro-x64
 
 

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
Listing ALL Tasks and/or Trimming Entries in Task Scheduler-tasksched-power2.jpg  
My System SpecsSystem Spec
30 May 2015   #9
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by carwiz View Post
I've settled with Sysinternal's AutoRun since I already have it.
Glad you found a solution that works for you, Carwiz.

Quote   Quote: Originally Posted by carwiz View Post
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'.


Quote   Quote: Originally Posted by Callender View Post
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 System SpecsSystem Spec
Reply

 Listing ALL Tasks and/or Trimming Entries in Task Scheduler




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Task Scheduler not Running Tasks
I created two tasks (Utorrent and Flashget) to run at 12:15 am every night but the tasks refuse to startup. I usually hibernate my computer at night so i have the two tasks "wake computer up to run this task" (the computer does wake itself up) The only way i can get it to run is if i manually run...
General Discussion
Task scheduler unable to load task status/active tasks at startup.
My task manager is unable to load task status/active tasks at startup. I get the message: "The selected task "{0}" no longer exists. To see the current tasks, click Refresh." When I refresh I get the same message. I checked and found that under Microsoft the problem was in the defrag...
Performance & Maintenance
Task Scheduler not preforming tasks.
I scheduled a .exe file to run on IE event. However that task does not seem to be running. At them moment all the .exe does is make the notepad window active (just testing at the moment) but this is not happening. I think I may not be understanding how task manager works. Any help is much...
General Discussion
Renaming Task Scheduler Tasks
Is there a way to rename tasks in Task Scheduler? Also, where does Win 7 Pro x64 store the task jobs? Thanx.
General Discussion
WMC Tasks Missing in Task Scheduler
Hello, The tasks for WMC are missing in Task Scheduler, although the actual files are in System32\Tasks and even in the registry. When I click on Media Center folder within Task Scheduler, I get errors something about task {0} missing. As a result, I'm unable to download TV guide data. ...
Media Center


Our Sites

Site Links

About Us

Find 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 03:47.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App