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.
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.
$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.
Track the values line by line. Predict the result before running this example in your own editor.