15 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 start several VMs, push to several blob storages, modify permissions of several users, and so on. In this chapter, you’ll learn two distinct techniques for accomplishing these and other multiple-target tasks: batch cmdlets and object enumeration. The concepts and techniques here are the same regardless of the OS you’re using.
Note This is an extremely difficult chapter and will probably frustrate you. Please be patient—with yourself and us—and trust that we do explain everything by the end.
15.1 The preferred way: “Batch” cmdlets
As you’ve learned ...
Get Learn PowerShell in a Month of Lunches, Fourth 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.