Welcome to the second edition of the long running series better know a UI! Today you’ll learn about the tools needed to create PowerShell user interfaces.
What do you need? Just Notepad and some know-how!
…I haven’t met my word quota for the day yet, so why don’t I go over some tools that make building PowerShell interfaces easier?
PowerShell ISE – With Add-ons!
The first tool on the list is the PowerShell ISE. The PowerShell ISE alone is a horrible user interface builder because there’s no graphical tools to build your UI and it crashes a lot when you’re working with UI code in it. Even though it has these limitations I still use the ISE because it is on every computer I go to and the crashing problem can be easily overcome with this addon! This add-on allows you to quickly run your code in a new PowerShell window outside of the ISE.
A function that will make your day easier is New-EphingWPFCode. This function will parse XAML and write your UI code for you! Now all you have to do is get the XAML, which brings us to… I am continuously imporoving on it, and will soon be adding threading and class support!
Visual Studio Community is a free program that gives you a professional level toolset to make your user interfaces. You could also use a paid version of Visual Studio if you have MSDN, but if not the Community edition gives you all the UI building things you’ll ever need!
That’s it. Those are the four things (PowerShell ISE, New Session Addon, New-EphingWPFCode, and Visual Studio Community) I use when I create all the user interfaces for my scripts. If you use any tools I missed, feel free to let me know in the comments!
Join me next time when I show you how to create a PowerShell user interface to buy a duck!
Until next time!