Skip to content

Glossary: Command Line for IT: Bash and PowerShell

try/catch

Also written: try, catch

In PowerShell, try { } catch { } runs the catch block when a command in try fails. Cmdlet errors only count if you add -ErrorAction Stop.

Where the book teaches it