Skip to content

Instantly share code, notes, and snippets.

@shaneis
Created August 27, 2018 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaneis/38c1bd2866dd218ad53afa3a8c297551 to your computer and use it in GitHub Desktop.
Save shaneis/38c1bd2866dd218ad53afa3a8c297551 to your computer and use it in GitHub Desktop.
#region Test-ManualConfirm
function Test-ManualConfirm {
[CmdletBinding()]
param(
[int[]]$Numbers
)
process {
foreach ($num in $Numbers) {
Read-Host -Prompt "Are you sure you want to process: [$num]"
"Current number: [$num]"
}
}
}
Test-ManualConfirm -Numbers $Numbers
#endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment