Thank you for this code. I modified it so that I could use the result from the dialog box. This is all I had to do:
$result = ([Windows.Forms.MessageBox]::Show(“$message”, “$title”, [Windows.Forms.MessageBoxButtons]::$Option, [Windows.Forms.MessageBoxIcon]::$Type,$WhichButtonHasFocus,$OnTop))
Write-Host $result
Then I can use the $result for whatever I like.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.