Since the deprecation and removal of VBScript is soon to become a reality 🙁 I feel the need to actually learn PowerShell properly.
What’s the equivalent of VBScript’s MsgBox
function? In VBScript it was very functional, memorable, minimalist.. In PowerShell though, this is the nicest thing I can find:
using assembly System.Windows.Forms
using namespace System.Windows.Forms
[MessageBox]::Show("Hello")
Which is pretty messy by comparison to VBScript, and changing the script’s namespace might not be appropriate.
Is there a way to just have all the Windows Forms stuff rolled up into one command? preferably so I don’t have to fully qualify the Class name every time. Maybe with Add-Type
or Alias
?
I’ve looked around and not really found anything better than the above.