Decisions
Decisions: If This, Then That: `if`, `elseif` and `else`, Many Choices: `switch`.
Updated
- If This, Then That: `if`, `elseif` and `else` (Apprentice): if runs a block of commands only when its test is True, elseif adds another test, else catches everything left, -and, -or and -not join tests together, and exit stops a script early, so a backup copies only when something changed and explains itself when it can't.
- Many Choices: `switch` (Apprentice): 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.