InvocationInfo Members

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.

  Name Description
public property BoundParameters Gets a dictionary of the arguments that were bound to parameters of the command. This property is introduced in Windows PowerShell 2.0.
public property 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.
public property DisplayScriptPosition Gets or sets the position for the invocation or error. Introduced in Windows PowerShell 3.0.
public property ExpectingInput Gets a value that indicates whether the command is expecting input from the pipeline. This property is introduced in Windows PowerShell 2.0.
public property HistoryId Gets the history identifier for the command that was invoked. This property is introduced in Windows PowerShell 2.0.
public property InvocationName Gets the name of the command that was invoked.
public property Line Gets the text of the line used to invoke the command.
public property MyCommand Gets information about the command.
public property OffsetInLine Gets the offset (in characters) of the command location in the line.
public property PipelineLength Gets the number of elements that are in the pipeline that contains the command.
public property PipelinePosition Gets the position of this command in the pipeline that contains the command.
public property PositionMessage Gets a formatted message that describes where the command appeared in the pipeline.
public property PSCommandPath Gets the path to the command, relative to the directory where the user invoked the command. Introduced in Windows PowerShell 3.0.
public property PSScriptRoot Gets the directory where the user invoked the command. Introduced in Windows PowerShell 3.0.
public property ScriptLineNumber Gets the line number of the script that contains the command.
public property ScriptName Gets the name of the script containing the command.
public property 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.
Top

(see also Protected Methods)
 NameDescription
public methodstaticCreateTBD. Introduced in Windows PowerShell 4.0.
public methodEquals  (Inherited from Object)
public methodGetHashCode  (Inherited from Object)
public methodGetType  (Inherited from Object)
public methodToString  (Inherited from Object)
Top

(see also Extension Methods)
 NameDescription
protected methodFinalize  (Inherited from Object)
protected methodMemberwiseClone  (Inherited from Object)
Top

  Name Description
public extension method As  Use this method to adapt an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  This is called to adapt an object from a foreign app domain to a known interface in this appDomainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  Adapts an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Use this method to adapt and extend an object so that you can pass it to a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  This is called to adapt and extend an object that we wish to pass to a foreign app domainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Used to extend an object with an interface from a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method ToEnumerable  This element is introduced in Windows PowerShell 5.0. (Defined by CollectionExtensions.)
Top


Show: