Chapter 16. Working with many objects, one at a time

The whole point of PowerShell is to automate administration, and that often means you’ll want to perform some tasks with multiple targets. You might want to reboot several computers, reconfigure several services, modify several mailboxes, and so on. In this chapter, you’ll learn three distinct techniques for accomplishing these and other multiple-target tasks: batch cmdlets, WMI methods, and object enumeration.

16.1. Automation for mass management

We know this isn’t a book about VBScript, but we want to use a VBScript example to briefly illustrate the way that multiple-target administration—what Don likes to call mass management—has been approached in the past. Consider this example (you ...

Get Learn Windows PowerShell in a Month of Lunches, Second 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.