Read Valid Input in PowerShell

Previously, any time I wanted to validate input in PowerShell, I’d write custom validation functionality per-script. It turns out that I reuse the same basic methods though, so I’ve created and shared a generalised function! This prompts users to enter input that matches a displayed list, then returns their input if successful. This works from VM or object selection, to simple y/n acceptance restrictions. The full details and code are here: https://github. [Read More]