Color theme
0 day streak0 XPP1
PowerShellQuiz 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
KNOWLEDGE CHECK

Predict the result.

Which report heading is printed?

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.

Review the lesson

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.

Choose your answer+25 XP on first completion