PowerShell practice: short, checked exercises
Build your first service report
Four checked skills: inspect properties, filter services, choose columns and produce CSV. Use the same fictional objects throughout, then apply the pipeline in a real admin project.
- 1. Read the propertiesPractise
- 2. Keep matching objectsPractise
- 3. Choose report columnsPractise
- 4. Export usable dataPractise
Four skills to practise. Progress stays in this browser; optional sign-in adds device sync.
Start: read the propertiesChoose your next step
A short drill or a complete report
Start with five minutes of practice. Then move into CSV, JSON, functions, errors, remoting and testing through reasoning checkpoints and the weekly lab.
Use these exercises to practise one pipeline skill at a time. Run supported commands against fictional data and check the result before moving on. Choose a lab when you want several steps in one task.
Not sure where to start? Follow a role-based learning path — Windows Admin, Helpdesk, and more — for a guided route through lessons and practice.
Choose your next task: type and inspect a pipeline · assemble command blocks · a short daily task · a complete weekly report · choose a reporting workflow · read an individual script ·
Services: filter, sort & select 14 exercises
Drill Get-Service pipelines: filter by status and startup type, then sort and select. (Learn track: Objects and pipelines)
Combine service filters
Return services that are both Running and Manual, sorted by Name. Both conditions must hold. Combine two conditions with -and before sorting the matching services.
Find automatic services
Return services with an Automatic start type, sorted by Name. Filter StartType, then put the service names in alphabetical order.
Find manual services
Return all services configured for Manual startup, including stopped services. Filter startup configuration without assuming that Manual services are stopped.
Find running W services in reverse order
Return running services whose Name matches W*, sorted by Name in descending order. Combine a status test with a wildcard name match, then reverse the sort order.
Find services outside automatic startup
Return every service whose StartType is not Automatic. Use an inequality test to include both Manual and Disabled startup types.
Find stopped services
Return every stopped service from the sample machine. Read Status from each service object and keep only stopped services.
Find the DNS service by name
Find the DNS client service in the fictional service inventory. Match the DNS client service by its service name, Dnscache.
List running services
Return every running service. Use an equality test on Status to select running services.
List service names beginning with W
Return the Name values of every service whose name begins with W, sorted alphabetically. Include stopped services. Match W* across every service, including stopped ones, then select Name.
Reverse the service list
Return all services in descending Name order. Compare ascending and descending Name order without filtering out services.
Sort the service list
Return every service, sorted alphabetically by Name. Sort service objects by Name while preserving every row.
Take the first three service names
Sort service names alphabetically, then return the first three. Sort before taking the first three names; the stage order changes the result.
Check stopped manual services
Return services that are both stopped and configured for Manual startup. Require both Stopped status and Manual startup with one compound filter.
Verify a service-name exclusion
Return all other service names in alphabetical order. Exclude the named service, then sort and select the remaining names.
Processes: filter, sort & select 13 exercises
Drill Get-Process pipelines: CPU, memory, and working-set exercises. (Learn track: Objects and pipelines)
Exclude the browser process
Return all processes except the one named chrome, sorted by Name. Use -ne to exclude chrome while keeping the other process objects.
Filter accumulated CPU time
Return processes whose cumulative CPU time is greater than five seconds. Compare cumulative CPU seconds with a numeric threshold, rather than a percentage.
Filter by memory use
Return processes with more than 100 MiB of working-set memory. The WS property is measured in bytes. Use PowerShell’s 100MB literal to compare the WS byte count.
Find process IDs above 9000
Return processes whose Id is greater than 9000, sorted by Id. Filter numeric process IDs, then sort them numerically.
Find processes below two CPU seconds
Return processes with cumulative CPU time below two seconds. Use -lt to select processes with less than two cumulative CPU seconds.
Find the busiest processes
Return the two processes with the highest cumulative CPU time, highest first. CPU is measured in seconds, not percent. Sort CPU seconds descending before selecting the top two processes.
Find the largest process below 100 MiB
Exclude processes using 100 MiB or more of working-set memory, then return the single largest remaining process. Filter memory first, then sort and select one remaining process.
Find the largest working set
Return the one process with the largest WS value. Find the highest WS byte count by sorting before limiting the result.
Find the smallest working sets
Return the three processes with the smallest working-set memory, smallest first. Sort all processes before limiting the result. Sort all working sets ascending before taking the smallest three.
Inspect PowerShell processes
Return processes whose Name matches pw*, sorted by CPU descending. Match pw* process names, then rank their cumulative CPU time.
Select the two busiest small processes
Among processes using less than 100 MiB of working-set memory, return the two with the highest cumulative CPU seconds, highest first. Apply the memory limit before ranking CPU time and taking two rows.
Sort processes alphabetically
Return every process in ascending Name order. Sort process objects by Name without changing the number of objects.
Compare process working sets
Return the two processes with the largest working sets. Rank processes by WS and select the two largest memory consumers.
Files, events & modules 3 exercises
Find large log files, inspect error events, and identify script modules. (Learn track: Shell foundations)
Find large log files
Return .log files larger than 10 MiB, largest first. Combine a .log extension test with a 10MB size threshold, then sort by Length.
Inspect error events
Return event IDs and providers for Error events. Filter Error-level event objects and select their IDs and providers.
Identify script-based modules
Return available modules whose ModuleType is Script. Filter ModuleType so binary and manifest modules are excluded.
Active Directory 5 exercises
Audit disabled accounts, find team members, and sort the directory. (Learn track: Windows and Active Directory)
Audit disabled AD accounts
Return the disabled accounts and their sign-in names. Filter the boolean Enabled property and select disabled account identities.
Find enabled IT staff accounts
Return the enabled accounts in the IT department, with their sign-in names. Combine Enabled and Department checks before selecting sign-in names.
List Finance team accounts
Return every account in the Finance department. Match the Department property rather than inferring team membership from names.
Sort AD accounts by name
Return all accounts in alphabetical order, showing whether each is enabled. Sort directory objects by Name and retain the Enabled property in the output.
Find accounts outside the IT department
Return every account that is not in the IT department. Use -ne on Department and inspect which accounts remain.
Azure 5 exercises
Review VM power states, resource groups, and inventory order. (Learn track: Remote and cloud administration)
Review non-running Azure VMs
Return the names and power states of non-running VMs. Use an inequality check to include every VM that is not running.
Find stopped Azure VMs
Return the VMs that are stopped, with their resource groups. Distinguish a stopped VM from other non-running power states.
List Lab resource group VMs
Return every VM in the Lab resource group. Filter ResourceGroupName to the Lab group while keeping all power states.
Sort Azure VMs by name
Return all VMs in alphabetical order with their power states. Sort VM objects by Name, then select Name and PowerState.
Find deallocated Azure VMs
Return the VMs that are deallocated. Match the deallocated state separately from the stopped state.
Guided activities
Choose a longer challenge, a focused review or a visual walkthrough.
Exercise Lab
Assemble PowerShell command blocks into a working pipeline — predict the output, check stage order, and diagnose errors.
Start an exerciseDaily practice30-day challenge
Work through checked command tasks and review the decisions behind each pipeline.
Open the challengeAdmin scenarioWeekly challenge
Plan a stopped-service audit with remote queries, failure handling and a structured report.
Read the scenarioMeasure · comparePerformance Lab
Record repeated timings and compare medians after verifying equivalent output.
Compare measurementsReview · refactorScript Clinic
Inspect a fragile script, compare safer patterns and review your own code.
Review a scriptExplain · verifyInterview simulator
Draft your response to an operational scenario, then compare the reasoning with review notes.
Try a scenarioStep · inspectVisual demos
Step through object filtering, member inspection and error handling with narrated stages.
Explore the demosError decoder
Paste the red text. The decoder names the kind of error it is and points at the lesson that fixes it. It never runs your code, and decoding happens entirely in your browser — your pasted error is never sent anywhere.