InvocationInfo InvocationInfo InvocationInfo Class


Describes how and where this command was invoked

[System.Diagnostics.DebuggerDisplay("Command = {MyCommand}")]
public class InvocationInfo
type InvocationInfo = class
Public Class InvocationInfo


BoundParameters BoundParameters BoundParameters

This member provides a dictionary of the parameters that were bound for this script or command.

CommandOrigin CommandOrigin CommandOrigin

This property tells you if you were being invoked inside the runspace or if it was an external request.

DisplayScriptPosition DisplayScriptPosition DisplayScriptPosition

The position for the invocation or error.

ExpectingInput ExpectingInput ExpectingInput

Is true if this command is expecting input...

HistoryId HistoryId HistoryId

History ID that represents the command. If unavailable, this will be -1.

InvocationName InvocationName InvocationName

Command name used to invoke this string - if invoked through an alias, then this would be the alias name.

Line Line Line

The text of the line that contained this cmdlet invocation.

MyCommand MyCommand MyCommand

Provide basic information about the command

OffsetInLine OffsetInLine OffsetInLine

Command's character offset in that line. If the command was executed directly through the host interfaces, this will be -1.

PipelineLength PipelineLength PipelineLength

How many elements are in the containing pipeline

PipelinePosition PipelinePosition PipelinePosition

which element this command was in the containing pipeline

PositionMessage PositionMessage PositionMessage

Formatted message indicating where the cmdlet appeared in the line

PSCommandPath PSCommandPath PSCommandPath

This property tells you the full path to the command from where you were being invoked

PSScriptRoot PSScriptRoot PSScriptRoot

This property tells you the directory from where you were being invoked

ScriptLineNumber ScriptLineNumber ScriptLineNumber

The line number in the executing script that contained this cmdlet.

ScriptName ScriptName ScriptName

The name of the script containing the cmdlet.

UnboundArguments UnboundArguments UnboundArguments

This member provides a list of the arguments that were not bound to any parameter


Create(CommandInfo, IScriptExtent) Create(CommandInfo, IScriptExtent) Create(CommandInfo, IScriptExtent)


Applies to