Prompt the interactive user to answer โyesโ or โnoโ in response to a query.
PowerShell
This example sets โyesโ as the default answer
0 -eq $Host.UI.PromptForChoice('caption', 'prompt text', @('&Yes', '&No'), 0)Outputs
$true if the user answers โyesโ $false if the user answers โnoโ