Source Code and Samples

Monday 5 February 2007

Messagebox in powershell

Description

Show Messagebox in powershell. First we need to add a reference to an assembly to out script.

Source Code

[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[Windows.Forms.MessageBox]::Show("Hello World!", "PowerShellScripts.blogspot.com", [Windows.Forms.MessageBoxButtons]::YesNo, [Windows.Forms.MessageBoxIcon]::Question)

No comments: