views:

352

answers:

3

The Powershell team preaches using GUI on top of Powershell (GUI actions translated into Powershell commands in the background and executed).

I love the idea, specially b/c it would make my GUI scriptable (it's nice to click click and then see a trace window with all the cmdlets that I've executed).

My question is, do they provide some kind of framework/library to implement such GUI over Powershell architecture?

A: 

WPF is scriptable through Powershell

Check out this post on the Windows PowerShell blog

Doug Mulley
Thanks, but that's not really what I was asking. I want to build my app similar to how Exchange Server is built on top of Powershell.
Nestor
You weren't very clear about what you were doing with it. And WPF can provide you with a shell GUI that can be used to drive PowerShell commandlets.
Doug Mulley
+5  A: 

Well the idea is that you build a traditional GUI-based management application and host PowerShell to do the real work via your cmdlets. MMC snapins are one way to go if you don't want to implement an entire application. These days you can use .NET/WinForms to build MMC snapins. That is the model the Exchange server uses. MMC 3.0 supports managed snapins - this MSDN article discusses how to do this. After that it should be pretty simple to take information from the GUI and translate that into the appropriate calls to your cmdlets.

Keith Hill
+2  A: 

PowerShell doesn't offer anything when it comes to the "GUI" part of the "GUI over Cmdlets" approach, but it does make the "over cmdlets" part easy.

The two approaches are:

The PowerShell Cmdlet Designer demonstrates both.

Lee Holmes [MSFT]
Windows PowerShell Development

LeeHolmes