Provides information about invoked commands, such as the name of the command, the string used to invoke the command, and where the command is in the pipeline.
The following tables list the members exposed by the InvocationInfo type.
|BoundParameters||Gets a dictionary of the arguments that were bound to parameters of the command. This property is introduced in Windows PowerShell 2.0.|
|CommandOrigin||Gets the dispatch origin of the command. For example, was the command dispatched internally by Windows PowerShell or by a runspace. This property is introduced in Windows PowerShell 2.0.|
|DisplayScriptPosition||Gets or sets the position for the invocation or error.|
|ExpectingInput||Gets a value that indicates whether the command is expecting input from the pipeline. This property is introduced in Windows PowerShell 2.0.|
|HistoryId||Gets the history identifier for the command that was invoked. This property is introduced in Windows PowerShell 2.0.|
|InvocationName||Gets the name of the command that was invoked.|
|Line||Gets the text of the line used to invoke the command.|
|MyCommand||Gets information about the command.|
|OffsetInLine||Gets the offset (in characters) of the command location in the line.|
|PipelineLength||Gets the number of elements that are in the pipeline that contains the command.|
|PipelinePosition||Gets the position of this command in the pipeline that contains the command.|
|PositionMessage||Gets a formatted message that describes where the command appeared in the pipeline.|
|PSCommandPath||Gets the path to the command, relative to the directory where the user invoked the command.|
|PSScriptRoot||Gets the directory where the user invoked the command.|
|ScriptLineNumber||Gets the line number of the script that contains the command.|
|ScriptName||Gets the name of the script containing the command.|
|UnboundArguments||Gets a list of the arguments that were not bound to parameters of the command. This property is introduced in Windows PowerShell 2.0.|
Send comments about this topic to Microsoft.