Chapter 13. PowerShell Jobs

This chapter covers

  • Asynchronous processing
  • PowerShell jobs
  • Job cmdlets
  • Job types
  • Workflow jobs
  • Scheduled jobs

Exit pursued by a bear

William Shakespeare Stage directions from The Winter’s Tale

So far, most of the techniques we’ve shown you have been synchronous, meaning you type in the command—be it a cmdlet, script, or function—and wait for the results. The results are back in a few seconds at most, usually far quicker. Synchronous execution is perfect for ad hoc, interactive working, but what about when you’re executing a long-running process against many remote machines that could take hours to run? Waiting for those to finish locks you out of further work in that console. You could open additional ...

Get Windows PowerShell in Action, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.