Many Choices: `switch`

switch compares one value with a list of choices and runs the block of each one that matches, with default for anything else; -Wildcard and -Regex match patterns instead of exact text, and a switch on a Read-Host answer makes a simple menu.

Updated

Cheat sheet for the lesson Many Choices: `switch`: switch compares one value with a list of choices and runs the block of each one that matches, with default for anything else; -Wildcard and -Regex match patterns instead of exact text, and a switch on a Read-Host answer makes a simple menu.
Category
PowerShell
Level
Apprentice
Tags
if-statement, powershell, read-host, switch-statement, wildcard