Log file inventory: a guided PowerShell project
Documentation: Microsoft Learn
Milestone 1 — Inspect file objects
Not checked yet
Inspect Name, Extension and Length in bytes.
Step through, copy or reset
Run the example to inspect its sample result.
Fictional data. Nothing runs on your device or tenant.
Follow the objects
Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.
Run or step through the command to follow its objects.
Inspect the inputs
These fictional objects are reset for every run.
Run and check the milestone
The browser runs supported sample commands against fictional objects. Nothing runs on your device or tenant.
- Open Sample data to inspect the input objects.
- Edit the command, then choose Run to see its final result.
- Choose Step from start repeatedly to inspect each pipeline stage in order.
- Choose Check answer to compare the final rows and properties with the milestone.
Reset restores the editor. Saved completion stays in your progress history.
PowerShell normally streams objects between commands. Sort-Object and Group-Object need their inputs before returning their grouped or sorted results; these sample stage snapshots show the result after each command.
Read the pipeline lesson →Milestone 2 — Find log files
Not checked yet
Keep files with the .log extension.
Step through, copy or reset
Run the example to inspect its sample result.
Fictional data. Nothing runs on your device or tenant.
Follow the objects
Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.
Run or step through the command to follow its objects.
Inspect the inputs
These fictional objects are reset for every run.
Run and check the milestone
The browser runs supported sample commands against fictional objects. Nothing runs on your device or tenant.
- Open Sample data to inspect the input objects.
- Edit the command, then choose Run to see its final result.
- Choose Step from start repeatedly to inspect each pipeline stage in order.
- Choose Check answer to compare the final rows and properties with the milestone.
Reset restores the editor. Saved completion stays in your progress history.
PowerShell normally streams objects between commands. Sort-Object and Group-Object need their inputs before returning their grouped or sorted results; these sample stage snapshots show the result after each command.
Read the pipeline lesson →Milestone 3 — Find large files
Not checked yet
Keep files larger than one million bytes.
Step through, copy or reset
Run the example to inspect its sample result.
Fictional data. Nothing runs on your device or tenant.
Follow the objects
Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.
Run or step through the command to follow its objects.
Inspect the inputs
These fictional objects are reset for every run.
Run and check the milestone
The browser runs supported sample commands against fictional objects. Nothing runs on your device or tenant.
- Open Sample data to inspect the input objects.
- Edit the command, then choose Run to see its final result.
- Choose Step from start repeatedly to inspect each pipeline stage in order.
- Choose Check answer to compare the final rows and properties with the milestone.
Reset restores the editor. Saved completion stays in your progress history.
PowerShell normally streams objects between commands. Sort-Object and Group-Object need their inputs before returning their grouped or sorted results; these sample stage snapshots show the result after each command.
Read the pipeline lesson →Milestone 4 — Rank by size
Not checked yet
Return the two largest files with Name and Length.
Step through, copy or reset
Run the example to inspect its sample result.
Fictional data. Nothing runs on your device or tenant.
Follow the objects
Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.
Run or step through the command to follow its objects.
Inspect the inputs
These fictional objects are reset for every run.
Run and check the milestone
The browser runs supported sample commands against fictional objects. Nothing runs on your device or tenant.
- Open Sample data to inspect the input objects.
- Edit the command, then choose Run to see its final result.
- Choose Step from start repeatedly to inspect each pipeline stage in order.
- Choose Check answer to compare the final rows and properties with the milestone.
Reset restores the editor. Saved completion stays in your progress history.
PowerShell normally streams objects between commands. Sort-Object and Group-Object need their inputs before returning their grouped or sorted results; these sample stage snapshots show the result after each command.
Read the pipeline lesson →Milestone 5 — Deliver candidates
Not checked yet
Show large .log files with Name and Length.
Step through, copy or reset
Run the example to inspect its sample result.
Fictional data. Nothing runs on your device or tenant.
Follow the objects
Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.
Run or step through the command to follow its objects.
Inspect the inputs
These fictional objects are reset for every run.
Run and check the milestone
The browser runs supported sample commands against fictional objects. Nothing runs on your device or tenant.
- Open Sample data to inspect the input objects.
- Edit the command, then choose Run to see its final result.
- Choose Step from start repeatedly to inspect each pipeline stage in order.
- Choose Check answer to compare the final rows and properties with the milestone.
Reset restores the editor. Saved completion stays in your progress history.
PowerShell normally streams objects between commands. Sort-Object and Group-Object need their inputs before returning their grouped or sorted results; these sample stage snapshots show the result after each command.
Read the pipeline lesson →Defend it
Explain what the report establishes and what you would verify before acting on a real system.
Compare with a model defense
This is a review list, not a delete command. Confirm application ownership, retention and backups before cleaning logs.
Storage review handover
Deliver a usable report
Record the root path, collection time, full file path and Length in bytes. Decide whether the collection is recursive and keep the scope in the handover.
Test the failure path
One folder is denied or a file changes during collection. Preserve the path and original error instead of quietly excluding that part of the inventory.
Verify before handing over
Check a large file directly with Get-Item and reconcile the file count. Do not sum formatted MB strings or delete files from size alone.
Complete each checked milestone above. Completion records show practice against fictional data; they do not certify a production script.
Apply this project to the next admin taskPractise the next scenario
Find large log files
Return Name and Length for .log files larger than 10,000,000 bytes.
The sandbox is visible now. Sign in with Google only when you run or check a task; commands and temporary files are discarded when you leave.
Run a command to inspect its result.