The second new Actions option which I would like to highlight in PowerGUI 1.8 (again, this is relatively advanced stuff for PowerPack authors) is the ability to select whether your action needs the objects from the PowerGUI grid pipelined into it:
Basically, you:
- Choose Action requires object selection when you need to manipulate the objects somehow. For example, you have a node which emits AD users (which means this is probably just a
Get-QADUser
cmdlet), and you create an action to enable selected accounts. You create an action, selectEnable-QADUser
– and you don’t need anything else. PowerGUI will automatically pipe selected objects from the grid intoEnable-QADUser
. - Choose Action doesn’t require object selection when your action does not care about the objects in the grid. For example, you want to create a New action which would create a new AD account. You add the action, choose
New-QADUser
as the cmdlet, and pick this setting to indicate that you don’t need any pipeline into the action.
Hope that helps!
Tags: PowerGUI, PowerShell
1 Response to “Manage pipeline in PowerGUI actions”