Author Posts

April 1, 2014 at 8:53 am

I have little experience in using microsoft visual studio and I would like to be able to create tools that have GUI and be able to call scripts from within the tool. Is this possible in the visual studio? If it is, what forms do you use in creating new project? Any other software recommendation to this GUI tools?

April 1, 2014 at 8:58 am

You certainly can use Visual Studio if you like, but http://www.sapien.com/software/powershell_studio is probably easier.

April 1, 2014 at 6:07 pm

It depends on your choice of GUI: WPF or WinForms. PowerShell studio will work great with WinForms while using Visual Studio, you can take the XAML code that is generated and placing it in the PowerShell ISE to continue building out the backend code. If you are looking at the WPF route, I've done a fair amount of blogging on that subject and have some things that may help you out.

If you are looking into digging into WinForms, then Sapien has an excellent forum just for this with a lot of useful information.

Also, there is ShowUI which is nice for building WPF GUIs using a more PowerShell syntax.

If you are looking at building a GUI, I would recommend looking at using a method to separate the UI thread from any code that you run to perform a task, whether it is PSJobs or using other runspaces, otherwise you run the risk of the UI locking up as it fights for control over the thread. I've done some work with this as well (using runspaces) that does require some more advanced methods, but may still be useful to look at.

April 2, 2014 at 12:38 pm

I am also using Powershell Studio and I am very pleased with it! Powershell Studio 2014 appeared some weeks ago as far as I know. I am still using 2012.