James reports, that the PowerShell library has been posted on Codeplex. There's lot's of good stuff happening in Hyper-V and scripting right now. Taylor Brown has a blog with more examples in PowerShell; Ben Armstong has some good stuff too; Ben's more of a VB guy than a PowerShell one and I'll probably continue to tease him gently about the fact ... he has a very long script. to compact a VHD. Mine is a 4 line function. Interestingly Taylor's post contains a "Wait for WMI Job" function and Ben has built in.
The source code is open (as Powershell tends to be) and distributed under the Microsoft public license (MS-PL).