Color theme
0 day streak0 XPP1
PowerShellLearn mode
MISSION 1 OF 3

Make report headings

0 XP earned
PowerShell track: IntermediateMission: IntermediateObject pipelinesPer-item transformationCurrent-item variables
Before you start this intermediate track

Terminal basics and object properties. The lessons use pipelines and script blocks.

Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.

x
0 / 6 challenges
LEARN THE CONCEPT

Understand it, then try it.

PowerShell pipelines pass objects from one command to the next. ForEach-Object runs a script block once per item, where $_ represents the current item. A string method transforms each topic into uppercase text. The -join operator combines the resulting strings into one heading line for a report.

report.ps1
$topics = @("trees", "rivers", "clouds")$headings = $topics | ForEach-Object { $_.ToUpper() }$line = $headings -join " | "Write-Output $line

Run each mission separately in PowerShell 7. These snippets only create in-memory values and print reports; they do not read or modify files, services, or system settings.

Track the values line by line. Predict the result before running this example in your own editor.