Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Yes or No
#region Test-ListeningConfirm
function Test-ListeningConfirm {
process {
foreach ($num in $Numbers) {
$keepGoing = Read-Host "Are you sure you want to process: [$num] (Y/N)"
if ($keepGoing -eq 'Y') {
"Current number: [$num]"
} else {
Test-ListeningConfirm -Numbers $Numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.