Make report headings
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.
Predict the result.
Which report heading is printed?
$topics = @("trees", "rivers", "clouds")$headings = $topics | ForEach-Object { $_.ToUpper() }$line = $headings -join " | "Write-Output $lineRun 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.