Command/More/ShowMessageBox.ps1
Write-Output "Start" function ShowAttachDialog() { [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") $result = [System.Windows.Forms.MessageBox]::Show( "Please, attach the debugger to the host process. When done, press OK.","Attach to process", [System.Windows.Forms.MessageBoxButtons]::OKCancel) switch ($result) { "OK" { write-host "You pressed OK" } "Cancel" { write-host "You pressed Cancel" } } } ShowAttachDialog Write-Output "End" |