
PowerShellは.Net Frameworkを利用することができますので、メッセージボックスを表示させることも出来ます。
まずは、アセンブリをロードさせます。
PS C:\work> [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") GAC Version Location --- ------- -------- True v4.0.30319 C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System....
次にMessageBoxクラスのShowメソッドを使って表示させます。
PS C:\work> [System.Windows.Forms.MessageBox]::Show("Hello World.")

メッセージボックスのボタンとアイコンを指定する
メッセージボックスのボタンやアイコンを指定するには次のようにします。PS C:\work> [System.Windows.Forms.MessageBox]::Show("保存が完了しました。", "情報", "OK", "Information")

[System.Windows.Forms.MessageBox]::Show("あなたが落としたのはこの金の斧ですか?", "質問", "YesNoCancel", "Question")

Yes!
スポンサーリンク