Project Description
An open-source GUI custom graphical host for PowerShell, using WPF (AvalonDock/AvalonEdit), written in VB.Net

Tutorial on building custom powershell host (using WinForms) can be found at http://powershellstation.com

Added treeviews and type-specific context menus (uses TypeNames in the PSObject to build a new menu for each object in the tree).

Example Script:

#create a new tree
new-tree Example

#add a node to the tree, with a file object attached to it
new-treenode "A File Node" -nodeobject  (dir c:\boot.ini -force)  -tree Example

#add a context menu item for all objects to show all properties
new-typemenuitem 'System.Object' 'ShowDetails' '*OBJECT* | fl *'

#add a context menu for FileInfo objects to echo the object to the host
new-typemenuitem "System.IO.FileInfo" "Show Object" "*OBJECT*"

#add a nested context menu for FileInfo objects to output the contents of the file to the host
new-typemenuitem "System.IO.FileInfo" "File_Operations" @{Get_Contents='gc $(*OBJECT*)'}

Screenshot of sample script


Last edited Feb 6, 2010 at 5:18 AM by MikeShepard, version 8