Windows Dev Center

PSCommand Members

Defines a pipeline that can be run by a PowerShell object. This class cannot be inherited. This class is introduced in Windows PowerShell 2.0.

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

  Name Description
  PSCommand Initializes a new instance of the PSCommand class. This constructor is introduced by Windows PowerShell 2.0.
Top

  Name Description
public property Commands Gets the commands, arguments, and scripts that are defined by the PSCommand object. This property is introduced in Windows PowerShell 2.0.
Top

(see also Protected Methods)
 NameDescription
public methodAddArgumentAdds an argument for a positional parameter to the last added cmdlet. This method is introduced in Windows PowerShell 2.0.
public methodAddCommandOverloaded.  
public methodAddParameterOverloaded. Adds a parameter to the last cmdlet of the pipeline. The variants of this method can add a named parameter and its value, or add a switch parameter that takes no value. This method is introduced in Windows PowerShell 2.0.
public methodAddScriptOverloaded. Adds a script to the end of the pipeline. The variants of this method can add the script with or without specifying that the script should be run only in local scope. This method is introduced in Windows PowerShell 2.0.
public methodAddStatementAdds an additional statement for execution.
public methodClearRemoves the cmdlets, arguments, and scripts that have been added to the PSCommand object. This method is introduced in Windows PowerShell 2.0.
public methodCloneGenerates an exact copy of the current PSCommand object. This method is introduced in Windows PowerShell 2.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:
© 2015 Microsoft