Skip to Content
Learn PowerShell in a Month of Lunches, Fourth Edition
book

Learn PowerShell in a Month of Lunches, Fourth Edition

by Tyler Leonhardt, Travis Plunk, James Petty
May 2022
Beginner content levelBeginner
360 pages
10h 10m
English
Manning Publications
Content preview from Learn PowerShell in a Month of Lunches, Fourth Edition

12 Filtering and comparisons

Up to this point, you’ve been working with whatever output the shell gave you: all the processes, filesystem objects, and various Azure commands. 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, such as getting processes or files that match a pattern. That’s what you’ll learn to do in this chapter.

12.1 Making the shell give you just what you need

The shell offers two broad models for narrowing 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 (discussed in section ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PowerShell for Sysadmins

PowerShell for Sysadmins

Adam Bertram

Publisher Resources

ISBN: 9781617296963Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link