Delen via


Command Class

Definition

Defines a Command object which can be added to Pipeline object for invocation.

public ref class Command sealed
public sealed class Command
type Command = class
Public NotInheritable Class Command
Inheritance
Command

Constructors

Command(String, Boolean, Boolean)

Constructor.

Command(String, Boolean)

Initializes a new instance of Command class using specified command parameter.

Command(String)

Initializes a new instance of Command class using specified command parameter.

Properties

CommandOrigin

Gets or sets the command origin for this command. A command origin of 'Runspace' (the default) applies Runspace restrictions to this command. A command origin of 'Internal' does not apply runspace restrictions.

CommandText

Access the command string.

IsEndOfStatement

Checks if the current command marks the end of a statement (see PowerShell.AddStatement())

IsScript

Access the value indicating if this Command represents a script.

MergeUnclaimedPreviousCommandResults

Sets this command as the mergepoint for previous unclaimed commands' results.

Parameters

Gets the set of parameters for this command.

UseLocalScope

Access the value indicating if LocalScope is to be used for running this script command.

Methods

MergeMyResults(PipelineResultTypes, PipelineResultTypes)

Merges this commands results.

ToString()

For diagnostic purposes.

Applies to