Asynchronous Processing

PowerShell prefers to run things synchronously, that is, sequentially, or one after another. However, it is frequently necessary to run many things simultaneously, without waiting for another command to complete. This is known as an asynchronous operation.

Operations of this nature may be local to the current machine, or might be used to run queries or code against remote systems.

PowerShell includes a number of different commands and classes that can be used to do more than one thing at a time. The most obvious of these are the job commands.

In addition to the job commands, PowerShell can react to .NET events, and can use Runspaces and Runspace pools.

This chapter explores the following topics:

  • Working with jobs
  • Reacting to events
  • Using Runspaces and Runspace pools
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.251.128