Chapter 11. Filtering and comparisons

Up to this point, you’ve been working with whatever output the shell gave you: all the processes, all the services, all the event log entries, all the hotfixes. But this type of output isn’t always going to be what you want. Often you’ll want to narrow down the results to a few items that specifically interest you. That’s what you’ll learn to do in this chapter.

11.1. Making the shell give you just what you need

The shell offers two broad models for narrowing down results, and they’re both referred to as filtering. In the first model, you try to instruct the cmdlet that’s retrieving information for you to retrieve only what you’ve specified. In the second model, which takes an iterative approach, you take ...

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.