Scheduled Job vs. Scheduled Task in PowerShell 7
PowerShell 7 can register a scheduled task but not a scheduled job. The job cmdlets load only in Windows PowerShell, where a job saves each run’s output.

On this page
TL;DR
Use Register-ScheduledTask for a new script. Its module, ScheduledTasks, loads in Windows PowerShell 5.1 and in PowerShell 7. Register-ScheduledJob works only in Windows PowerShell 5.1. PowerShell 7 blocks its module, PSScheduledJob, from loading, so the cmdlet fails there. Choose Register-ScheduledJob only when the script stays in Windows PowerShell and you want Receive-Job to return each run’s output. A scheduled task keeps no output, so a script run as a task writes its own log.
With PowerShell 7 and Windows PowerShell, there are often two commands that seem similar. Register-ScheduledJob and Register-ScheduledTask are one of those pairs. Both schedule a script, both show up in Task Scheduler, and in Windows PowerShell you can pick either.
Microsoft’s pages say the scheduled job module no longer ships with PowerShell 7, and none of them says what happens when you call its cmdlets there. So I registered the same script both ways on Windows Server 2025, then tried each cmdlet in Windows PowerShell 5.1 and in PowerShell 7. Here’s what happened, and which one to use.
Tested with
- OS
- Windows Server 2025 Datacenter 24H2
- Windows PowerShell
- 5.1
- PowerShell
- 7.6.10 and 7.7.0
- Date
- November 2026
How a scheduled job differs from a scheduled task
The two cmdlets differ in four ways that decide which one you pick: which PowerShell loads them, what you register, where the output goes and where you see it.
Module and PowerShell version
Register-ScheduledJob comes from the PSScheduledJob module. Its reference page (opens in a new tab) says the module is “included in Windows PowerShell” and that the cmdlet “was introduced in Windows PowerShell 3.0”. Microsoft’s differences between Windows PowerShell and PowerShell 7 (opens in a new tab) page lists PSScheduledJob under “Modules no longer shipped with PowerShell”.
On my server the module is still on disk, in the Windows PowerShell module folder, marked for the Desktop edition only. Windows PowerShell 5.1 loads it. PowerShell 7.6 and 7.7 don’t, and Register-ScheduledJob fails there. The exact errors are in What PowerShell 7 does with a scheduled job.
Register-ScheduledTask comes from the ScheduledTasks module. Its reference page (opens in a new tab) says the cmdlet “registers a scheduled task definition on a local computer”. The module sits in the same folder, marked for both the Desktop and Core editions. Windows PowerShell 5.1 loads it, and so do PowerShell 7.6 and 7.7. PowerShell 7 loads it directly. It doesn’t need the compatibility feature, which runs a module in a separate Windows PowerShell session.
What you register
Microsoft defines a scheduled job as “a Windows PowerShell background job that can be started automatically on a one-time or recurring schedule”. You give Register-ScheduledJob a script block with -ScriptBlock or a .ps1 file with -FilePath.
A scheduled task runs an action. The Register-ScheduledTask page says you can register a task to run “executable files (.exe and .com), batch files (.bat and .cmd), or any registered file type”. New-ScheduledTaskAction builds the action. To run a script, the action starts powershell.exe or pwsh.exe, and -Argument carries the script’s path.
Where the output goes
A scheduled job saves each run on disk, in the profile of the account that registered the job:
$HOME\AppData\Local\Microsoft\Windows\PowerShell\ScheduledJobs\<JobName>\Output\<Timestamp>After one run, that folder holds Results.xml and Status.xml. In Windows PowerShell, Get-Job lists the run as a completed job of type PSScheduledJob. Receive-Job returns what the script wrote: in my run, an object with its properties, a string and a warning. Microsoft’s about_Scheduled_Jobs (opens in a new tab) page says “the results of the job are saved on disk until you delete them or the maximum number of results are exceeded.”
A scheduled task keeps none of that. After the task runs the same script, Get-ScheduledTaskInfo gives you the last run time, the last result code, the next run time and a count of missed runs. Get-Job doesn’t list the task’s run. To keep what the script prints, send it to a file yourself.
Where you see it
Microsoft says scheduled jobs “appear in Task Scheduler in the Task Scheduler Library\Microsoft\Windows\PowerShell\ScheduledJobs folder”. My job appeared there. Its action starts powershell.exe, which imports PSScheduledJob and loads ScheduledJobDefinition.xml from the job’s folder under ScheduledJobs, beside Output. A scheduled job is a scheduled task that Windows PowerShell wrote for you.
A scheduled task appears in Task Scheduler wherever you registered it. Mine had no -TaskPath, so it went in the root of the library.
Register the same script each way
To see those differences rather than read about them, I registered one script both ways. I ran both of these in Windows PowerShell 5.1, as a local administrator. The script is C:\Scripts\nightly.ps1. Neither registration has a trigger, so each one runs only when you start it. To put either on a schedule, add -Trigger with a trigger from New-JobTrigger for the job or New-ScheduledTaskTrigger for the task.
Registering a scheduled job:
Register-ScheduledJob -Name Nightly -FilePath C:\Scripts\nightly.ps1Starting it the way I did, through its Task Scheduler entry:
Start-ScheduledTask -TaskName Nightly `
-TaskPath '\Microsoft\Windows\PowerShell\ScheduledJobs\'Start-Job -DefinitionName Nightly runs it as an ordinary background job, and that run’s output isn’t saved with the job.
Reading its output after the run finishes:
Import-Module PSScheduledJob
Get-Job
Receive-Job -Name Nightly -KeepRegistering a scheduled task that runs the script as SYSTEM:
$action = New-ScheduledTaskAction -Execute 'powershell.exe' `
-Argument '-NoProfile -ExecutionPolicy Bypass -File C:\Scripts\nightly.ps1'
Register-ScheduledTask -TaskName Nightly-Task -Action $action `
-User 'NT AUTHORITY\SYSTEM' -RunLevel HighestStarting the task:
Start-ScheduledTask -TaskName Nightly-TaskThe same registration runs in PowerShell 7.6 and 7.7. There, set -Execute to "$PSHOME\pwsh.exe", the pwsh.exe of the PowerShell you’re in. My task finished with result 0.
Send a task’s output to a log file
A task hands you no output, so the fix is an action that sends every stream to a log file. I registered this one from PowerShell 7, under its own name so the first task stays as it was. The log’s folder has to exist first:
New-Item -ItemType Directory -Force C:\Logs | Out-Null
$command = "& 'C:\Scripts\nightly.ps1' *> 'C:\Logs\nightly.log'"
$action = New-ScheduledTaskAction -Execute "$PSHOME\pwsh.exe" `
-Argument "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
Register-ScheduledTask -TaskName Nightly-Logged -Action $action `
-User 'NT AUTHORITY\SYSTEM' -RunLevel HighestThe log holds the object as a formatted table, then the string and the warning text. The object’s Edition is Core. That’s text, not the objects Receive-Job returns. Under -Command, a script that exits with a code other than 0 or 1 reports 1 to Task Scheduler. PowerShell -File vs. -Command: Which Exit Code Does the Caller Get? has the cases.
What PowerShell 7 does with a scheduled job
If you move a script to PowerShell 7 and reach for the job cmdlets, this is what you get. PowerShell 7.6.10 and 7.7.0 behave the same way.
Register-ScheduledJob fails in PowerShell 7
Error
The 'Register-ScheduledJob' command was found in the module 'PSScheduledJob', but the module could not be loaded. For more information, run 'Import-Module PSScheduledJob'.PowerShell 7 finds the module in the Windows PowerShell folder and refuses to load it. Get-ScheduledJob fails the same way. Nothing I tried in PowerShell 7 loaded it. Register the script as a scheduled task:
$action = New-ScheduledTaskAction -Execute "$PSHOME\pwsh.exe" `
-Argument '-NoProfile -ExecutionPolicy Bypass -File C:\Scripts\nightly.ps1'
Register-ScheduledTask -TaskName Nightly-Pwsh -Action $action `
-User 'NT AUTHORITY\SYSTEM' -RunLevel HighestImport-Module PSScheduledJob is blocked
Error
Module 'PSScheduledJob' is blocked from loading using Windows PowerShell compatibility feature by a 'WindowsPowerShellCompatibilityModuleDenyList' setting in PowerShell configuration file.PowerShell 7 can load some Windows PowerShell modules through the compatibility feature. Microsoft’s Windows PowerShell compatibility (opens in a new tab) page puts PSScheduledJob on the default deny list for that feature. Adding -UseWindowsPowerShell gives the same error.
Never force the import with -SkipEditionCheck. The import appears to work, and then Get-ScheduledJob and every Get-Job in that session fail:
Error
Could not load type 'System.Runtime.Serialization.NetDataContractSerializer' from assembly 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.To register, change or list a scheduled job, open Windows PowerShell and run the cmdlets there.
Registered jobs keep running in Windows PowerShell
Having PowerShell 7 on the server doesn’t stop a job you registered from Windows PowerShell. Its Task Scheduler entry starts powershell.exe, so when I started the job, the script still ran in Windows PowerShell 5.1 and saved its results as before.
PowerShell 7 can’t read those results. In a new PowerShell 7 session, Get-Job returns nothing for a job that Windows PowerShell lists as completed. Open Windows PowerShell to read them:
Import-Module PSScheduledJob
Receive-Job -Name Nightly -KeepChoose Register-ScheduledJob for results you read in Windows PowerShell
Choose a scheduled job when the script stays on Windows PowerShell 5.1 and you want each run’s output back as objects. Get-Job lists the runs, and Receive-Job returns what each one produced. You write no log file.
The cost is that the job is tied to Windows PowerShell. The script runs in 5.1 whatever else is installed, and you register, change and read the job from 5.1. To run the script in PowerShell 7, you register it again as a scheduled task and add the logging yourself.
Choose Register-ScheduledTask for a program on a schedule
Choose a scheduled task when the action is a program, or when the script runs in PowerShell 7 now or may later. A task can start powershell.exe, pwsh.exe or any other executable. You register it with the same cmdlets from either PowerShell.
The cost is the output. Nothing hands you the run’s results afterward, so you redirect them to a log or the script writes its own. Whether the task reports success is a separate question: Task Scheduler Falsely Reports Success for a PowerShell Script That Works Manually covers the result code Task Scheduler records.
What I didn’t test
- Editing the deny list. I didn’t remove
PSScheduledJobfromWindowsPowerShellCompatibilityModuleDenyListinpowershell.config.json. Microsoft put it there by default. - PowerShell 7 from the MSI or the Store. I unpacked 7.6.10 and 7.7.0 from their release zips and left the configuration file alone.
Sources
- Register-ScheduledJob (Microsoft Learn) (opens in a new tab)
- about_Scheduled_Jobs (Microsoft Learn) (opens in a new tab)
- Register-ScheduledTask (Microsoft Learn) (opens in a new tab)
- New-ScheduledTaskAction (Microsoft Learn) (opens in a new tab)
- Differences between Windows PowerShell 5.1 and PowerShell 7 (Microsoft Learn) (opens in a new tab)
- about_Windows_PowerShell_Compatibility (Microsoft Learn) (opens in a new tab)