•Arnošt Havelka
Filter with Where-Object
Use Where-Object to find items matching conditions.
Start Interactive LessonThe Where-Object cmdlet filters items based on conditions. Find exactly what you need from large datasets.
Filtering with Conditions
Try the command
Filter items with conditions!
Build the command
Get-ChildItem | Where-Object {$_.Length -gt [size]}
-gtGreater than
-ltLess than
-likePattern matching
Terminal
C:\Users\User>Get-ChildItem | Where-Object {$_.Length -gt [size] }
Targeted Search
Command Prompt
file1.txt (500 bytes)
file2.txt (2000 bytes)
file3.txt (100 bytes)
C:\Users\User>Get-ChildItem
Knowledge Check
1 / 1What does -gt mean?
References
These documentation links provide authoritative details for the commands used in this article.