PowerShell: MessageBox
<#
MessageBox types:
0: OK
1: OK Cancel
2: Abort Retry Ignore
3: Yes No Cancel
4: Yes No
5: Retry Cancel
#>
# Simple MessageBox
[System.Windows.Forms.MessageBox]::Show("We are proceeding with next step." , "Status", 0)
# Get value from MessageBox
$output = [System.Windows.Forms.MessageBox]::Show("We are proceeding with next step." , "Status" , 4)
if ($output -eq "YES" )
{
# Do something
Write-Host "YES"
}
else
{
# Do something else
Write-Host "NO"
}