Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Filtering and comparisons > Common points of confusion

9.6. Common points of confusion

Anytime I introduce Where-Object in a class, I usually come across two main sticking points. I tried to hit those pretty hard in the preceding discussion, but if there’s any room left for doubt, let’s clear it up now.

9.6.1. Filter left, please

You want your filtering criteria to go as close to the beginning of the command line as possible. If you can accomplish the filtering you need on the first cmdlet, do so; if not, try to filter in the second cmdlet so that the subsequent cmdlets have as little work to do as possible.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint