Command Command Command Class

Definition

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

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

Constructors

Command(String) Command(String) Command(String)

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

Command(String, Boolean) Command(String, Boolean) Command(String, Boolean)

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

Command(String, Boolean, Boolean) Command(String, Boolean, Boolean) Command(String, Boolean, Boolean)

Constructor

Properties

CommandOrigin CommandOrigin 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 CommandText CommandText

Access the command string.

IsEndOfStatement IsEndOfStatement IsEndOfStatement

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

IsScript IsScript IsScript

Access the value indicating if this Command represents a script.

MergeUnclaimedPreviousCommandResults MergeUnclaimedPreviousCommandResults MergeUnclaimedPreviousCommandResults

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

Parameters Parameters Parameters

Gets the set of parameters for this command.

UseLocalScope UseLocalScope UseLocalScope

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

Methods

MergeMyResults(PipelineResultTypes, PipelineResultTypes) MergeMyResults(PipelineResultTypes, PipelineResultTypes) MergeMyResults(PipelineResultTypes, PipelineResultTypes)

Merges this commands results

ToString() ToString() ToString()

for diagnostic purposes

Applies to