Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
There may be times when you want to provide feedback to the user in a message box, or even get some response from a user with a message box. This is relatively easy to do. The following script shows basic syntax to create a message box, and then check to see what button the user clicked:
$obj = new-object -comobject wscript.shell $intButton = $obj.popup("Do you want to continue?",0,"A question for you", 4) If ($intbutton -eq 6) { write-host "User pressed yes" } elseif ($intbutton -eq 7) { write-host "User pressed no" }