From the course: PowerShell 7 Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Filter specific data - PowerShell Tutorial
From the course: PowerShell 7 Essential Training
Filter specific data
- [Instructor] Now of course selecting content or selecting objects is fairly straightforward using select object. Now, once we treat those objects, often we need to filter out the values to specific equals to or it doesn't equal or something that's like a specific value. So as an example of this we can reuse the get command option which if I just enter that you'll see just, I'm going to cut that short because it will just keep going forever. But the get command is quite a large result set. So what we can do is we can use what's referred to as ware object or the word where member visual studio code is going to complain. And then what we do is we wrap things in these squirly brackets. It's almost like a full loop inside that data that's coming back. It's represented by doing the dollar and the underscore, and then the dot, which will then represent the field that we wish to filter on, so I'm going to say command…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.