Exercise 3: The 3 Largest .log Files by Size — Possible Solution ==================================================================== THE PIPELINE ------------------------------ Get-ChildItem -Filter *.log | Where-Object { $_.PSIsContainer -eq $false } | Sort-Object Length -Descending | Select-Object -First 3 -ExpandProperty Name WHY IT WORKS THIS WAY ------------------------------ Get-ChildItem -Filter *.log narrows the listing to .log files up front, at the source, rather than filtering everything afterward. Where-Object { $_.PSIsContainer -eq $false } is a safety check ensuring only real files are considered (a folder that happened to match the filter pattern would otherwise slip through). Sort-Object Length -Descending orders the remaining file objects by their real Length property, largest first - the same real-property sorting Chapter 1 first introduced. Select-Object -First 3 -ExpandProperty Name keeps only the top three results and unwraps them down to plain filename strings rather than full file objects, since the exercise asked for names only, not complete objects. WHY THIS WORKS AS AN ANSWER ------------------------------ It combines Get-ChildItem, Where-Object, Sort-Object, and Select-Object as required, correctly sorts by the real Length property rather than a text-parsed size, and correctly uses -ExpandProperty (rather than -Property) to produce plain names instead of full file objects, matching the exercise's own requirement.