Exercise Lab: assemble a working PowerShell pipeline
Documentation: Microsoft Learn
Exercise Lab asks you to assemble command blocks in the right order. It is useful when you recognise a cmdlet but are unsure which stage should come next. Use the other labs when you want to type the pipeline yourself.
Choose your next task: short checked exercises · type and inspect a pipeline · a short daily task · a complete weekly report · choose a reporting workflow · read an individual script ·
Overview
POWERSHELL / EXERCISE LAB
Choose a skill below. Count the sample rows that match the task, enter your prediction, then click command blocks in order. Run your pipeline, investigate the error, and answer the final question.
First: count the matching sample objects and check your prediction.
No timer. No lost streaks. One pipeline, one diagnosis, one recall check.
- Build & run
- Diagnose & fix
- Recall
01 / PREDICT
Find busy processes
Return all processes with more than 5 cumulative CPU seconds, keeping their original properties.
Browser simulation · sample data — no real PowerShell execution or system changes.
CPU is cumulative processor time in seconds, not live CPU percentage. All values are sample data.
| Name | CPU |
|---|---|
| chrome | 42 |
| Windows PowerShell | 18 |
| notepad | 1 |
| worker | 8 |
Inspect the sample objects and apply the task constraints.
02 / BUILD & RUN
Restored interactive mission flow
Predict, build, diagnose and explain
All runs use the site's fictional browser dataset. Nothing touches your machine.
1 · Predict
How many sample processes have more than 5 cumulative CPU seconds?
Busy processes
Keep CPU above 5 seconds, then sort highest first.
Stopped services
Return stopped services in alphabetical order.
Largest working sets
Sort processes by working set and keep the top two.
2 · Diagnose
The report shows the smallest CPU values first. Which check confirms the ordering direction before you edit anything?
3 · Recall
What does Get-Process CPU represent?
Make the pipeline
Click blocks in execution order. Each selected block can be removed. Keyboard: Tab, then Enter.
Show reference output
Check your prediction to enable Run.
03 / DIAGNOSE
Investigate before you fix
The report shows the smallest CPU values first.
Which inspection confirms the ordering direction?
Choose a diagnostic check.
Which fix puts the largest CPU values first?
04 / EXPLAIN
Keep the idea, not just the answer
What does Get-Process CPU measure?
Select the explanation that transfers to a real task.
MISSION COMPLETE
You tested the idea.
Prediction, pipeline, diagnosis and recall checked. This is a local practice result, not a certification.
Filter first to keep processes with more than 5 cumulative CPU seconds.
Sort-Object defaults to ascending order. Inspect the pipeline before changing the machine.
Alternative investigation: pipe the original objects to Get-Member to inspect their properties before composing filters.