Note:This survey was purely around what UI framework do people use to create UI for the PowerShell scripts and not about what tools they use. I included PrimalForms and Visual Studio only because they facilitate easier creation of UI. PowerGUI AdminConsole fits perfectly into the options if I were to do a survey on the tools you use to create GUI apps to wrap PowerShell scripts.
Do you create GUI for any of your PowerShell Scripts?
What are some of the reasons for creating UI for PowerShell scripts?
#1 reason was expected. I have heard many administrators asking for this and doing it. “Other” reasons included:
- Sometimes GUI is easier for picking up some values from a closed pool. I use it to define memberships for a new users in AD, or adding user to access groups there.
- Sometimes faster to use GUI
- Creating a Script with High End admin functions which can be passed to a SubOrdinate
In the above responses, option D and E take second place in overall votes. This shows that the UI still plays a role in automation. Especially, when the script requires complex input or when the overall automation flow requires executing several scripts based on a user input. GUI is the best option in such cases.
What do you use to create GUI?
#1 framework here seems to be WinForms. Although WinForms is an old fashioned approach to creating UI, it still rules because tools such as PrimalForms make it easy to create UI and export it to a PowerShell script very easily. I, personally, love WPF and do some scripting in that.
Another way to look (thanks to @Poshoholic) at the results is:
Ten respondents preferred using Visual Studio to create the UI (in either WPF or WinForms) and then exporting the C# code to PowerShell using Add-Type cmdlet. While nine people preferred to script the UI using one of the available modules (WPK or PowerBoots). This actually shows that the Visual Studio method is a bit popular than WPK & PowerBoots modules. Mostly because UI elements and design are taken care by Visual Studio. Of course, this method has pros and cons.
Both WPK and PowerBoots (currently Show-UI) are a bit complex and need more knowledge of using PowerShell. James Brundage and Joel Bennett did a great job at creating these modules for WPF. However, the community examples and help around using these modules is relatively less. I hope Show-UI (a merge of WPK and PowerBoots) fixes this.
Other votes went to options such as using Visual Studio for designing the UI and then exporting the C# code from there to a PowerShell script.