Let the user choose between yes and no and work with the result
Add-Type -AssemblyName System.Windows.Forms
$MsgBoxResult = [System.Windows.Forms.MessageBox]::Show("Select Yes or No", "Window Title", "YesNo", "Information")
if ($MsgBoxResult -eq "YES" ) {
Write-Host "Choice was YES"
}
else {
Write-Host "Choice was NO"
}