December 26, 2014 at 1:57 pm #21431
Can we create a GUI interface in PowerShell tool? If, can, how is it?
December 26, 2014 at 1:59 pm #21432
Yes. PowerShell Studio.
December 26, 2014 at 5:36 pm #21433
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.
December 29, 2014 at 5:27 am #21446
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.
December 30, 2014 at 4:17 am #21505
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.
December 30, 2014 at 9:07 am #21514
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
December 30, 2014 at 9:35 am #21518
Its made by Sapien. And its the only editor aside from the ISE/notepad that anyone on my team uses these days.
December 31, 2014 at 9:23 am #21533
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.
You must be logged in to reply to this topic.