Another great addition in PowerGUI 1.8 is Display Configuration dialog box in action properties.
Among other things, this dialog box finally lets you set precisely the way PowerGUI decides which links and actions to show for the objects in the central grid.
The way PowerGUI works with regards to links and actions is pretty simple. It checks the types of the first element in the grid (or the types which the element used to have last time if there is 0 objects this time) and picks all the links and actions associated with any of the types.
This has a few implications:
- You can fine-tune the way that the links and actions are selected by targeting them to various types (including base types from which other types are derived) or share them across multiple types – just set the appropriate types in the dialog box shown above.)
- You can associate an action with a tree node (rather than the object type) by manually adding your own special type to the objects your node emits: e.g.
$myObject.PSObject.TypeNames.Insert(0,'MyObjectTypeName')
– see this post for more information on manipulating PowerShell types.
These mechanisms are not new, but now you have a dialog box in GUI to fine-tune the behavior.
Tags: PowerGUI, PowerShell