A Podcast about Windows PowerShell.
In This Episode
Tonight on the PowerScripting Podcast we talk with Joel Bennett and James Brundage about scriptable user interfaces.
News
Is your scripting might equal to the challenge? Put the power in your hands – download PowerGUI today
- Antoine blogged about v0.4 of PoshBoard and his presentation given at Techdays 2009 France
- PrimalScript 2009 released!
- Upcoming PowerShell UK UG schedules have been posted
- Karl Prosser blogs about the new release of PowerShellPlus 2.1 beta
Interview
Want to make Windows PowerShell easier than ever to learn and master? Checkout Idera’s PowerShellPlus Professional Edition which is now available for download! The new version has vastly improved code completion and a slick interactive Learning Center. Go to www.idera.com/PodcastPeople to get your copy today!
- dougchase : ## What do we need to do to get started with this stuff?
- jkavanagh58 : ## Is PrimalForms WPF?
- dougchase : ## Does it work in V1 and how do I implement it in V1? Seems like I read it worked in both versions but I couldn’t figure out how to start using it in V1.
- ChadMiller : ##Haven’t looked at WPF. Can you write a web page in WPF like powershellasp?
- rfoust : ## can you recommend a site to understand the basics of WPF?
- hal: Will these scriptable UI tools be able to replace HTA?
- jasonmarcher : ## How easy is it to create data templates and add them to existing tools/controls
New-Grid -Rows 5 {
New-Label “Please Enter Your Name”
New-TextBox -Name YourName -Row 1
New-Label “Sex:” -Row 2
New-StackPanel -Row 3 {
New-RadioButton -Content “Male” -IsChecked $true
New-RadioButton -Content “Female” -Column 1
}
New-Button “Done” -Row 4 -On_Click {
$yourName = $window | Get-ChildControl YourName
$sex = $window |
Get-ChildControl |
Where-Object {
$_ -is [Windows.Controls.RadioButton] -and
$_.IsChecked
} |
Foreach-Object {
$_.Content
}
if (-not $yourName.Text) {
[Windows.Messagebox]::show(“Who are you?”)
}
$global:information = New-Object Object |
Add-Member NoteProperty Name $yourName.Text -PassThru |
Add-Member NoteProperty Sex $sex -PassThru
$window.Close()
}
} -show
Resources
- Steve Murawski has a several part series talking about using the .NET framework from PowerShell. (part 1, part 2a, part 2b)
- Andy did a blog post that talks about custom objects
- PoshCode script: Compare-DatabaseSchema
- Lee Holmes posted a fun script to make perfect change
- James O’Neill posts some scripts for working with the Vista/W7/Server 2008 firewall
- Joel has written a scriptable SSH client in Powershell using an external .NET library
Tips
- From StackOverflow.com: How to get the actual size-on-disk of a file from PowerShell?
- Shay posted some information about using help in PowerShell ISE
Gotcha
- Kirk Munro has an awesome blog post talking about a quite wicked gotcha involving quoting rules and escape characters.

Just a couple of points of clarification with regards to PrimalScript 2009 and related products. http://www.primaltools.com is a new unifying site that brings together all of our software sites under one domain. While we previously had http://www.primalscript.com and http://www.primalscope.com, etc, all of our software information can now be found at http://www.primaltools.com. http://www.scriptingoutpost.com is still the place where the software can be purchased.
Also, while some of the tools at primaltools.com are stand-alone versions of specific functionality found in PrimalScript, this functionality STILL EXISTS in PrimalScript. The stand-alone tools are, for the most part, extensions of the functionality in PrimalScript, and are targeted at people who may need that functionality in addition to PrimalScript or for those that do not do any scripting, but may have specific needs fulfilled by these tools.