Introduction
The pipeline lets you send data from one command to another easily, like passing a ball between friends.
command1 | command2 | command3
Get-Process | Sort-Object CPU -Descending
Get-ChildItem | Where-Object { $_.Extension -eq ".txt" }Get-Service | Where-Object { $_.Status -eq "Running" } | Select-Object Name, StatusGet-ChildItem | Where-Object { $_.Length -gt 1000 } | Select-Object Name, Length| do in PowerShell?| connects commands by passing output from one as input to the next.| passes output to next command [OK]| is a comment symbol| with variable assignment| stops script executionGet-ChildItem | Where-Object { $_.Length -gt 1MB }. 1MB is a valid byte literal (1048576 bytes). Use $_. for current object and -gt for greater than.> "1MB" (string comparison, incorrect filtering). C omits $_. (undefined Length). D simplified syntax with "1MB" (string compare).Get-Process | Where-Object { $_.CPU -gt 100 } | Select-Object -Property NameGet-Service | Where-Object { $_.Status = 'Running' }= which is an assignment, not a comparison. PowerShell requires -eq for equality checks.Status is a valid property of service objects.-Recurse with Get-ChildItem to get files in all subfolders.Length descending, then select the first 5 files.Pass the test and this pattern moves unknown