Command Members

Defines a command that contains a single cmdlet or script. The Command object is used by the PowerShell and Pipeline objects to define a single command.

The following tables list the members exposed by the Command type.

  Name Description
  Command Overloaded. Creates a new Command object. The variants of this constructor can create an object that contains the name of the command or an object that contains the command and a script indicator.
Top

  Name Description
public property CommandText Gets the command name or script of the Command object.
public property IsEndOfStatement  
public property IsScript Gets a Boolean value that indicates whether the Command object contains a script.
public property MergeUnclaimedPreviousCommandResults Gets and sets PipelineResultTypes constants that specify what output streams are merged for previous unclaimed command results.
public property Parameters Gets the parameters for the command.
public property UseLocalScope Gets a Boolean value that indicates whether the Command object should be run in its own local scope.
Top

(see also Protected Methods)
 NameDescription
public methodEquals  (Inherited from Object)
public methodGetHashCode  (Inherited from Object)
public methodGetType  (Inherited from Object)
public methodMergeMyResultsMerges the results that this Command writes to one stream (such as its Error stream) with the results of another stream (such as the Output stream).
public methodToStringOverridden. Generates a string representation of the current Command 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: