I work to much, that’s a fact! So todays tip is how to throw a Coffee Break message box in PS.. Hehe… useful in long scripts, or as a scheduled task on the Laptop. Quite nerdy tip
1. Start PS as Admin, Load the Assembly
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
2. Display a simple “OK” box with title;
[System.Windows.Forms.MessageBox]::Show("Coffee Break! –Click “OK” when cup is empty " , "the Coffee Break")
There are like 6 different message boxes in PowerShell, if you got inspired you can find in depth information here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.messageboxbuttons.aspx