PowerShell Background Job Visibility

Learn how to view Windows PowerShell v3 background jobs through task scheduler.

John Savill

June 14, 2013

1 Min Read
PowerShell Background Job Visibility

Q: If I create a background job in PowerShell, can I view it using the Task Scheduler?

A: Yes. PowerShell v3 introduces background jobs, which enable a trigger to be created such as a certain time, and then a block of script registered for that trigger.

Behind the scenes, the Windows task scheduler is actually being used to manage this and can be viewed by using Task Scheduler. For example, if you enter this:

PS C:> $Trigger = New-JobTrigger –Daily –At 2am

PS C:> Register-ScheduledJob –Name MyScheduledJob –ScriptBlock {Get-Process} –Trigger $Trigger

Then launch Task Scheduler and under Task Scheduler Library, Microsoft,  Windows, PowerShell, ScheduledJobs, the PowerShell background jobs will be visible.
 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like