Skip to main content

Background Processing

  • Chapter
  • First Online:
PowerShell for Beginners
  • 1549 Accesses

Abstract

If you ever need to run a task in the background or have multiple smaller tasks that you want to run in parallel, you can use PowerShell jobs. Jobs are blocks of code that run in their own PowerShell instance, and you can retrieve the output at any point and even stop the job when required. Let’s say you need to write a script that needs to connect to all computers on a network and retrieve their operating system version to build a report. Doing this task individually could take a very long time, but if you could run ten of these tasks at once, you can greatly reduce the overall amount of time that report would take to run. I do this type of task along with others such as connecting to multiple Microsoft and Google cloud services to retrieve report information for our business clients. Running the tasks as individual background jobs takes a fraction of the time.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Waters, I. (2021). Background Processing. In: PowerShell for Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7064-6_15

Download citation

Publish with us

Policies and ethics