Chapter 12. Multitasking with background jobs

Everyone’s always telling you to “multitask,” right? Why shouldn’t PowerShell help you out with that by doing more than one thing at a time? It turns out that PowerShell can do exactly that, especially for longer-running tasks that might involve multiple target computers. Make sure you’ve read chapters 10 and 11 before you dive into this chapter, because we’re going to take those remoting and WMI concepts a bit further.

12.1. Making PowerShell do multiple things at the same time

You should think of PowerShell as a single-threaded application, meaning that it can only do one thing at once. You type a command, you hit Return, and the shell waits while that command executes. You can’t start running ...

Get Learn Windows PowerShell in a Month of Lunches now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.