O'Reilly logo

Windows PowerShell for Developers by Douglas Finke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Building GUI Applications in PowerShell

When Jeffrey Snover was showing PowerShell (then Monad) around Microsoft, one of the responses he received was, “A new command line? Snover, what about Windows don’t you get?” In fact, Windows Server 8 is all about not running graphical user interfaces (GUIs). It can be run as a headless server.

Note

Want to follow along with the examples in this chapter? Download ShowUI and you can try out the examples as you go: http://showui.codeplex.com/.

ShowUI is a PowerShell module to help build WPF user interfaces in script. It makes the complicated world of WPF easy to use in PowerShell. You can use ShowUI to write simple WPF gadgets, quick frontends for your scripts, components, and full applications.

Why a Chapter About GUIs?

So why a whole chapter devoted to GUIs, you ask? Great question! First off, GUIs are optimal in many scenarios. For example, sometimes users want to see a list of information that has several attributes. They don’t want to see those details whizzing by on the console; they want to capture it in a screen to be able to vertically and horizontally scroll through it.

The challenge with GUIs comes when users need to do a task over and over, clicking through a number of screens, entering info, clicking some more, type, click, type, clickety, click, click. They’re out!

Ultimately, as developers we need to deliver what the user wants, and that deliverable is sometimes a GUI. Being the lazy coder, I like to get my job done in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required