Can we create a GUI interface in PowerShell tool? If, can, how is it?
Yes. PowerShell Studio.
It’s very possible to create GUI tools with Powershell. As mentioned by Don, Powershell Studio allows the creation of GUIs using a graphical interface. It is very similar in feel to creating a WPF application in Visual Studio or a form in Microsoft Access. However, Powershell Studion is pretty pricey; If you use all the time it’s well worth it but not for a one-off or for experimentation.
You can do the same thing just by using Windows Presentation Foundation (WPF) which Powershell has full access to, but this requires a lot of extra code overhead. You can also use Windows Forms which is an older way of doing what WPF does, but is still valid for many uses.
For simple pop-ups and such, I have even used stuff like the Wscript.Shell object - think Yes/No/Cancel dialogs and such.
I got introduced to PowerShell Studio when I was at TechMentor earlier this year. I was able to build usable tools for my admins in less than an hour. Like Matt mentioned, it’s pretty pricey if it’s coming out of your own pocket. If the company is paying for it though, the cost isn’t bad at all.
You can also download the 30 day trial if it’s something that you only need temporarily. From what I can recall it gives full functionality during that period.
If you export the build to clipboard, then you can paste the entire code into the PowerShell ISE and continue work from there.
Thank you so much Don Jones sir, how can I get PowerShell Studio? I mean, can you send me any link to download PowerShell Studio?
Thank you once again
Its made by Sapien. And its the only editor aside from the ISE/notepad that anyone on my team uses these days.
Agreed with Matt McNab. If you’re just creating simple GUI’s for your scripts you’re better off spending a little time learning WPF or (my favorite) XAML. Also do not overlook the extremely useful ‘Show-Command’ cmdlet! Many times I can get away with that alone!
There are free WPF and XAML editors out there but I’m not sure what I’m allowed to post here so just ask Google. But as Will said if work is flipping the bill than PS Studio is the way to go.