Friday, December 23, 2016

Building a GUI with PowerShell

Many IT Pros are familiar with the concept of using Windows Forms and PowerShell to create a simple. The approach is not always that easy if you are doing it from scratch - automation is very helpful.

Sapien's PowerShell Studio (see for more information) works very well, but it is commercial. And at a price of £389, out of reach to many folks.

I just discovered a cool online site that does a great job of building a GUI with PowerShell - for free:  The starting page looks like this:

This is not anywhere near as rich as Sapien's tool, but great for really simple GUI development. Once you get the form right, just copy/paste it into the ISE and away you go!

Thursday, December 22, 2016

PowerShell cmdlet documentation is open source - COOL!

I was recently teaching a PowerShell course, and we looked at the definition the NAME parameter in Get-Service. It stated that the parameter did not accept wild cards. But it did. That made the demo sub-optimal.

So what's the obvious thing to do? Easy: just fix it!  And you can! If you look at the online version of the cmdlet's documentation (here: the page looks like this:

In the upper right-hand corner is a little button Contribute. You do need to be logged in with a Microsoft Live ID to see the contribute icon.

Clicking Contribute takes you to the GitHub page for this document. All you have to do is to click on the Edit (the pencil icon), make the changes, and create a pull request. The pull request asks the doc team accept your update. Then send it and away you go. The whole process is automated and very quick and easy. The pull request is reviewed before being accepted - and as part of that process, the doc team can ask for something more/different. The process is very slick.

And finally, when you DO have the pull request accepted, your Live ID picture appears on the page. COOL - my face on the PowerShell documentation.