$yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes","help"
$no = new-Object System.Management.Automation.Host.ChoiceDescription "&No","help"
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes,$no)
$answer = $host.ui.PromptForChoice("Prompt","Click yes to continue",$choices,0)
if($answer -eq 0){
Write-Host "You clicked Yes"
}elseif($answer -eq 1){
Write-Host "You clicked No"
}
Creates a Yes/No prompt and provides an example of taking actions based on the answer selected.