-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug
Description
Summary of the new feature / enhancement
Currently you must define a variable to splat parameters to a command. Allow splatting a hashtable directly.
This could simplify syntax and reduce mistakes from splatting in loops where the current loop fails to update the splatted variable and the wrong iteration's parameters are applied.
Additionally, it may to provide parameter tab completion for an in-line splat than a variable defined before the function is called.
Proposed technical implementation details (optional)
Invoke-Command @{
ComputerName = 'computer1','computer2','computer3'
ScriptBlock = { 'my name is {0}' -f $env:computername }
ErrorAction = 'stop'
}
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug