Admin Power Level: Intermediate Chapter 12: Let the Computer Do the Work on Time

Show, disable, and enable scheduled tasks

Get-ScheduledTask lists tasks on the computer. Disable stops a task from running without deleting it, and Enable turns it back on. Disabling is the safe way to pause a task.

Lesson 1 of 2 in Chapter 12: Let the Computer Do the Work on Time. Previous step in this path: DNS records and zones. 3 learning objectives, 7 examples, and a knowledge check.

Start: what you will learn

Get-ScheduledTask lists tasks on the computer. Disable stops a task from running without deleting it, and Enable turns it back on. Disabling is the safe way to pause a task.

Learning objectives

  • List scheduled tasks and filter by state
  • Disable a task without deleting it
  • Enable a task again and confirm its state

Concept in simple words

What it is: a scheduled task is a job that Windows runs for you at a set time or on a trigger, such as at logon or every day. Get-ScheduledTask shows you the tasks on your computer, and Disable-ScheduledTask and Enable-ScheduledTask turn a task off and back on. You are not running the job yourself when you use these commands. You are looking at a saved job definition, or switching that definition off and on.

Why it works

Why it exists: a lot of useful work repeats, and people forget, get busy, or are away when the work is due. A backup, a cleanup, or a report should still happen even if you are not sitting at the computer. A scheduled task solves that problem by letting the computer watch the clock and start the job for you. Your job as the admin is to know what is scheduled, to pause it safely when needed, and to turn it back on when the pause is over.

What PowerShell is doing behind the command: when you run Get-ScheduledTask, PowerShell asks the Task Scheduler service for the registered task definitions on your computer. Each result is an object, not just text on screen. That object has properties, such as TaskName, TaskPath, and State, and also deeper parts, such as Triggers, Actions, and Settings. That is why you can pipe the result to Where-Object and Select-Object. You are filtering and choosing properties from real objects, not cutting up lines of text.

The parts of a task, in plain words: TaskName is the short name of the task. TaskPath is the folder that holds the task, and the root folder is shown as a single backslash. Triggers say when the task starts. Actions say what program or script runs. The principal says which account the task runs as. Settings say how the task should behave, for example what happens if the computer is busy or if a run is missed. State is the current condition of the task. You do not need to memorise every part yet, but you do need to know that a task is a whole definition, not just a name.

State, in depth: Ready means the task is enabled and waiting for its trigger. Disabled means the task is paused, so its trigger will not start it. Running means an instance of the task is running right now. Read State slowly, because it answers a different question from the question of whether the last run worked. A task can be Ready and still have failed on its last run. A task can also be Running even after you disable it, because disabling stops future starts, it does not stop a run that is already going. For last run detail, you need Get-ScheduledTaskInfo, which you will meet later in this lesson.

Disable, stop, and delete are three different ideas, and mixing them up causes real mistakes. Disable pauses future runs and keeps the definition. Stop, with Stop-ScheduledTask, stops all running instances of a task right now, but it does not pause future runs. Delete, with Unregister-ScheduledTask, removes the definition completely. If you only need a break, choose Disable. If a runaway task is running now, you may need Stop as well. Only choose delete when you are sure you will never need that definition again, and only for a task you created or own, never for a system task you do not understand.

Think of it like this

Think of it like this: a light switch. Turning a lamp off does not throw the lamp away, and turning it back on does not mean you have to rewire the house. Disabling a task is the same idea, the job stays in place, it just stops running until you switch it back on. Deleting the task would be like throwing the lamp away and then having to buy and wire a new one later. Stopping a task is different again. It is like pulling the plug while the lamp is on. It deals with right now, not with tomorrow.

How it works, step by step

How it works, step by step: First, list tasks and look at the TaskName, TaskPath, and State columns. Second, narrow the list with a filter, for example only tasks whose State is Ready or Disabled. Third, if you want to pause one task, disable it by its exact name, and check its TaskPath too, because different folders can hold tasks with the same short name. Fourth, read the task back to confirm the state really changed. Fifth, write down why you disabled it and when you plan to enable it again, so the pause does not turn into a silent failure.

Safety first, before you touch any task: test on your own computer first, and start with a task you created yourself, not a system task. Disabling and enabling change what your computer does automatically, so do not guess. If a task name looks like it belongs to Windows or to an app you do not know, leave it alone and find out what it does first. Also, changing a task usually needs an elevated PowerShell window, which means PowerShell run as administrator. If you get an access denied error, that is often the cause, and it is a sign to stop, check your window, and only continue if you are sure the change is safe.

Let us walk through example 1: Get-ScheduledTask | Where-Object { $_.State -eq "Ready" } | Select-Object TaskName, State -First 5. Get-ScheduledTask lists the tasks. The pipe, written as |, sends those task objects to the next command. Where-Object keeps only objects where the State property equals Ready, and $_ means the current task in the list. Select-Object then shows only the TaskName and State columns, so the output is easy to scan. The -First 5 part limits the result to five rows, which keeps a long list readable. Look for the State column, because that tells you whether a task is ready to run, disabled, or running right now.

Let us walk through example 2: Disable-ScheduledTask -TaskName "Backup", followed by Get-ScheduledTask -TaskName "Backup" | Select-Object TaskName, State. The first command disables one task by its exact name. The second command reads that same task back, and it is the step beginners skip most often. In the output, look for State changing to Disabled. If the state did not change, do not assume the disable worked. Check the name, check the TaskPath, and check whether your PowerShell window is elevated. The read back is your proof.

Let us walk through example 3: Get-ScheduledTask | Where-Object { $_.State -eq "Disabled" } | Select-Object TaskName, TaskPath, State -First 3. This is the same filter idea as example 1, but it keeps only Disabled tasks. Select-Object shows TaskName, TaskPath, and State, and TaskPath matters here. Two tasks can share a short name in different folders, and the path is what tells them apart. The -First 3 part limits the list to three rows. In the output, look for the folder in TaskPath, not just the name, before you decide to enable anything.

Let us walk through example 4: Get-ScheduledTask -TaskName "Backup" | Format-List TaskName, TaskPath, State. The -TaskName part asks for one task by name, instead of listing every task on the computer. Format-List then shows each property on its own line, which is easier to read than a wide table when you want detail about one task. In the output, check all three lines. TaskName confirms you have the right task, TaskPath confirms you have the right folder, and State confirms whether it is Ready, Disabled, or Running.

Let us walk through example 5: Enable-ScheduledTask -TaskName "Backup", followed by a read back with Get-ScheduledTask. Enable does the reverse of Disable. It switches the same saved definition back on. It does not run the task right away. It only makes the task Ready again, so the next trigger can start it. In the output, look for State changing back to Ready. If you expected the job to run at once, you need Start-ScheduledTask instead, which you will use in the next lesson to test a task on demand.

Let us walk through example 6: Get-ScheduledTaskInfo -TaskName "Backup" | Select-Object LastRunTime, LastTaskResult, NextRunTime. Get-ScheduledTask shows the definition of a task. Get-ScheduledTaskInfo shows run time information about that task. LastRunTime tells you when it last ran. LastTaskResult tells you the result code from that run, where zero usually means success. NextRunTime tells you when it is due to run next. If NextRunTime is empty for a disabled task, that is expected, because a disabled task has no next run until you enable it again. Use this command when a task looks Ready but the work is not happening, because Ready alone never proves the last run worked.

Let us walk through example 7: Get-ScheduledTask -TaskName "Backup" | Disable-ScheduledTask. Here you pipe the task object itself into Disable-ScheduledTask, instead of typing the name a second time. PowerShell takes the object, reads its name and path from it, and disables that exact task. This pattern is safer than typing a name from memory, because you cannot mistype a name that PowerShell already found for you. It is still not a shortcut to skip the read back. After the pipe, run Get-ScheduledTask again and confirm the state, exactly as in example 2.

What changes if you change one part: change "Ready" to "Disabled" in the Where-Object filter and you get the paused list instead of the active list. Change -First 5 to -First 20 and you see more rows, but a very long list gets harder to scan. Remove Select-Object and you get the default columns, which may hide the detail you need or show more than you need. Change -TaskName "Backup" to a different name and you act on a different task, which is why exact names and TaskPath checks matter so much. Small changes in a filter change which tasks you see, and small changes in a name change which task you pause.

Common mistakes and edge cases to watch for: the biggest one is disabling by a short name when several tasks share that name in different folders, so always check TaskPath. Another is disabling a task for maintenance and forgetting to enable it again, so a backup or cleanup job quietly stops and nobody notices until something goes wrong. A third is thinking Disable stops a task that is already Running. It does not, so a running task can keep running after you disable it. A fourth is piping a wide filter into Disable-ScheduledTask without looking at the list first, which can pause many tasks at once. Always look first, then act on one clear target.

Worked examples

Read each example in order. Each one explains its parts, then shows what to look for in the output.

Syntax

Syntax
Get-ScheduledTask | Disable-ScheduledTask | Enable-ScheduledTask

Example 1

Lists ready tasks only, so you see what is actually scheduled to run.

Example 1
Get-ScheduledTask | Where-Object { $_.State -eq "Ready" } | Select-Object TaskName, State -First 5

Illustrative output: TaskName State -------- ----- Backup Ready

Example 2

Disables one task, then reads it back to confirm the new state.

Example 2
Disable-ScheduledTask -TaskName "Backup"
Get-ScheduledTask -TaskName "Backup" | Select-Object TaskName, State

Illustrative output: TaskName State -------- ----- Backup Disabled

Example 3

Get-ScheduledTask lists the tasks. Where-Object keeps only tasks whose State property equals Disabled, so you see paused tasks. Select-Object shows the TaskName, the TaskPath folder, and the State, and -First 3 limits the list to three rows so it stays readable.

Example 3
Get-ScheduledTask | Where-Object { $_.State -eq "Disabled" } | Select-Object TaskName, TaskPath, State -First 3

Illustrative output: TaskName TaskPath State -------- -------- ----- Backup \ Disabled

Example 4

Shows one task in detail, one property per line, so you can confirm the name, the folder, and the state together.

Example 4
Get-ScheduledTask -TaskName "Backup" | Format-List TaskName, TaskPath, State

Illustrative output: TaskName : Backup TaskPath : \ State : Ready

Example 5

Enables the task again, then reads it back. Enable makes the task Ready again, it does not run the task right away.

Example 5
Enable-ScheduledTask -TaskName "Backup"
Get-ScheduledTask -TaskName "Backup" | Select-Object TaskName, State

Illustrative output: TaskName State -------- ----- Backup Ready

Example 6

Shows run time detail for one task: when it last ran, the result of that run, and when it is due next. Use this when Ready alone does not explain what happened.

Example 6
Get-ScheduledTaskInfo -TaskName "Backup" | Select-Object LastRunTime, LastTaskResult, NextRunTime

Illustrative output: LastRunTime LastTaskResult NextRunTime ----------- -------------- ----------- 11/3/2026 2:00 AM 0 11/4/2026 2:00 AM

Example 7

Pipes the exact task object into Disable-ScheduledTask, so you cannot mistype the name, then reads the task back to confirm Disabled.

Example 7
Get-ScheduledTask -TaskName "Backup" | Disable-ScheduledTask
Get-ScheduledTask -TaskName "Backup" | Select-Object TaskName, State

Illustrative output: TaskName State -------- ----- Backup Disabled

Nothing on this page executes PowerShell code. The outputs above are illustrative only.

Common mistakes and troubleshooting

Read these before you try the examples, so you can spot the same problems in your own work.

  • Deleting a task to pause it, then losing its trigger and action settings. Disable instead.
  • Disabling a task by a short name when several tasks share that name in different folders. Check TaskPath too.
  • Disabling a task for maintenance and then forgetting to enable it again, so a backup or cleanup job quietly stops running and nobody notices until something goes wrong.
  • Disabling a task and expecting a run that is already going to stop at once. Disable stops future starts only. Use Stop-ScheduledTask if you need to stop a running instance, and read the task back after.
  • Piping a wide list into Disable-ScheduledTask without looking at the list first, and pausing many tasks by accident. List, filter, and check the names first, then act on one clear target.
  • Enabling a task and assuming it ran right away. Enable only makes it Ready again. The task runs at its next trigger, or when you start it on demand.
  • Trusting State Ready as proof that the last run worked. Ready only means the task is waiting. Check LastRunTime and LastTaskResult with Get-ScheduledTaskInfo to see what really happened.
  • Disabling or enabling without elevation and then thinking the command failed for a strange reason. Changing tasks usually needs PowerShell run as administrator, so check your window before you retry.

Knowledge check

Knowledge check

What is the safe way to pause a scheduled task?

Pick one answer. Feedback appears right away, and you can try again.

Remember this and next step

Remember this: listing first, disabling second, and reading back third is the safe pattern. Disable pauses a task without losing its settings, and Enable brings it back, so pause is almost always better than delete when you only need a break. State tells you if a task is Ready, Disabled, or Running, and Get-ScheduledTaskInfo tells you what actually happened on the last run. Check the name, check the folder, confirm the state, and write down why you paused it, and you will avoid the quiet failures that catch beginners out.

Next step: Create a scheduled task