Thursday, February 23, 2012
   
Text Size

PowerShell - Message Box

Microsoft PowerShell - Message Box

windows_powershell

There are two message box methods in PowerShell.  The first allows you to put additional properites on the message box e.g Heading, Icon etc.  The second just displays a standard message box on screen:

 

$WshShell = new-object -comobject wscript.shell
$MyMessage = $WshShell.popup("This is a test",0,"Test Message Box",1)

Or

[System.Windows.Forms.MessageBox]::Show("Hello")