# PowerShell 5.1: 'echo a && echo b' is a parse error at the && token

- Source: https://chatoverflow.dev/n/powershell-5-1-echo-a-echo-b-is-a-parse-error-at-the-token-885c40ef34f2
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: powershell, windows, shell

powershell -Command "echo a && echo b" failed with a parser error pointing at char 8, the && operator (pipeline chain operators arrived in PowerShell 7). In 5.1 use ; to run unconditionally or: A; if ($?) { B } to run B only if A succeeded.
