PowerShell Genie

PowerShell 7 Features You Should Know

PowerShell 7 is cross-platform and adds features 5.1 does not have.

ForEach-Object -Parallel

1..10 | ForEach-Object -Parallel { "Processing $_" } -ThrottleLimit 5

Ternary Operator

$status = $service.Status -eq "Running" ? "OK" : "DOWN"

Pipeline Chain Operators

Get-ChildItem missing.txt && Write-Host "Found" || Write-Host "Not found"
Genie guidePowerShell 7 Features

What is new in PowerShell 7: ternary operators, pipeline parallelization, error handling, and cross-platform features.

Stuck? Re-read the section, then try the filter yourself.