Find large log files
Documentation: Microsoft Learn
Return .log files larger than 10 MiB, largest first.
The task
A log folder is using more space than expected. Identify the large files before deciding whether they can be archived.
Target
Return .log files larger than 10 MiB, largest first.
What the result tells you
Length is bytes. In PowerShell, 10MB means 10 × 1024 × 1024 bytes. Filtering by extension prevents unrelated large files from entering this report.
Verify the result
Run the source by itself and inspect the sample objects. Add each filter separately, then check the final properties and order.
The browser uses a small fictional dataset. Real results depend on the host, module, account and target environment.
Why inspect file size before removing a log?
Choose an answer, then check your reasoning.
Worked solution
Worked solution
Reveal one approach
Related reference
Read the command and platform requirementsTry it in the lab
Write your pipeline below and run it against the fictional sample data, then check your result against the expected answer.
Follow the objects
Run the command to inspect each stage.