PowerShell Background Job Visibility
Learn how to view Windows PowerShell v3 background jobs through task scheduler.
June 14, 2013
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
You May Also Like