Inject Dynamic WPF GUIs into your PowerShell Pipeline shows Edit-Object. You supply an
object and it creates a WPF GUI so you can edit it. The example compiles C# code on the fly.
Below are three native PowerShell objects being edited in the pipeline. A PowerShell Custom Object, Get-Process Object and Get-ChildItem object.
There are plenty of others to experiment with too.
PowerShell Custom Object
Produces the same screen as above using a PSObject.
$obj = New-Object PSObject | Add-Member -PassThru NoteProperty Name 'John Doe' | Add-Member -PassThru NoteProperty Age 5 | Add-Member -PassThru NoteProperty Address 'SomeWhere in the USA' | Add-Member -PassThru NoteProperty City 'Common Town' | Add-Member -PassThru NoteProperty State 'State' | Add-Member -PassThru NoteProperty Zip '00000' Edit-Object $obj
Built-in Get-Process
Edit-Object (Get-Process svc* | select -First 1 Name, Company)
Get-ChildItem
Edit-Object (Get-ChildItem | select -First 1)


{ 0 comments… add one now }