Tag: elegir

$caption = "TITLE" $message = "MESSAGE" $yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes","HELP_FOR_YES" $no = new-Object System.Management.Automation.Host.ChoiceDescription "&No","HELP_FOR_NO" $choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes,$no) $answer = $host.ui.PromptForChoice($caption,$message,$choices,0) if($answer -eq 0){ //YOUR_CODE_IF_YES }