Skip to content

Instantly share code, notes, and snippets.

View tommymaynard's full-sized avatar

tommymaynard tommymaynard

View GitHub Profile
# Option 1: Y and N ONLY.
Do {
$Response = Read-Host -Prompt 'Enter Y for Yes or N for No'
} Until ($Response -eq 'Y' -or $Response -eq 'N')
If ($Response -eq 'Y') {
'Doing yes stuff...'
} ElseIf ($Response -eq 'N') {
'Doing no stuff...'
}