Scripting is one thing, but to make your tools really pop, you’ll eventually want to build your own Graphical User Interface for end-users to use, especially those who might be frightened of using a scripting environment like PowerShell.
In this series, I’ll take you step by step, from creating a GUI using the slower but easy to understand System.Windows.Forms method to the super quick, super effective XAML/WPF approach, using Visual Studio.
As time goes on and I post more and more about GUI Toolmaking, this post will always be updated with the newest links
XAML And Visual Studio
- PART VI – Step by step, building an advanced application
- Original ISE Snippet – XAML to GUI Loader
- Runspace-Powered multi threaded ISE Snippet
- Part V – Building responsive PowerShell apps with progress bars
- Part IV – Handling events and making a tabbed interface
- Part III – Using Advanced GUI Elements in PowerShell
- Part II – Deploying PowerShell GUIs in Minutes using Visual Studio
- Part I – Creating PowerShell GUIs in Minutes using Visual Studio – A New Hope
Hi Steven,
Awesome blog, any ideas why the below GUI for starting a service fails…
Function Services {
param($computer, $service)
$WPFStart.Add_Click({
Get-Service -Name $WPFService.Text -computer $WPFServer.Text | Set-Service -Status Running
})
}
LikeLike
Please post the code in paste bin or a github gist and then give the link. Need to know more to guess why it’s broke!
LikeLike
http://pastebin.com/JuL8BawW 🙂
LikeLike
Hi James,
Found the issue. You created a function to start a service, but never called it. I just removed the Function StartService{ and closing curly brace } from lines 76 and 80 and it works.
LikeLike
Hi,
really like your blog. Do you have an ETA for part 5? I would like to know how progress bar works.
LikeLike
If you’d like to see progress bars, check out tiberriver256.github.io, he made an awesome module for progress bars.
I just had a baby, so I’m working on part V in between diapers!
LikeLike
Thank you for the fast answer. Good luck with baby #2.
LikeLike
Could you explane how to use multi-form GUI with powershell and WPF, please? (One form call another one and send data etc )
LikeLike
As in one GUI launches, then closes, and then we carry the results on to the next UI pane?
LikeLike
I have noticed you don’t monetize your site, don’t waste your traffic, you can earn extra cash every month because you’ve
got hi quality content. If you want to know how to make extra bucks, search for: Mertiso’s tips best adsense alternative
LikeLiked by 1 person
Fuck off man. I’ve recieved this exact message like ten times in the last week. Please jump off a cliff.
LikeLiked by 3 people