2.2.3.12 Command

This data type represents a command in a pipeline.

Command is an object with the following extended properties (see section 2.2.5.2.9).

  • The name of the command or text of script to execute. (The format of a script is unspecified, because the PowerShell Remoting Protocol directly passes the script to the remote runspace implemented in the higher layer on the server, which in turn parses and executes the script.)

    • Property name: Cmd.

    • Property type: String (see section 2.2.5.1.1).

  • A Boolean indicating to the higher layer whether the command to execute is a script.

    • Property name: IsScript.

    • Property type: Boolean (see section 2.2.5.1.3).

  • A Boolean indicating to the higher layer whether to use local scope or global scope to invoke the commands.

    • Property name: UseLocalScope.

    • Property type: Boolean (see section 2.2.5.1.3) or Null Value (see section 2.2.5.1.20).

  • A flag indicating to the higher layer whether error and output streams are to be merged on pipeline invocation. This property SHOULD have the same value as MergeToResults.

    • Property name: MergeMyResults.

    • Property type: PipelineResultTypes (see section 2.2.3.31).

  • A flag indicating to the higher layer whether error and output streams are to be merged on pipeline invocation. This property SHOULD have the same value as MergeMyResults.

    • Property name: MergeToResults.

    • Property type: PipelineResultTypes (see section 2.2.3.31).

  • A flag indicating to the higher layer whether execution is to merge error and output streams coming from previous commands in the pipeline.

    • Property name: MergePreviousResults.

    • Property type: PipelineResultTypes (see section 2.2.3.31).

  • A flag indicating to the higher layer whether the error stream is to be merged with the output stream on pipeline invocation.

    • Property name: MergeError.

    • Property Type: PipelineResultTypes (see section 2.2.3.31).

  • A flag indicating to the higher layer whether the warning stream is to be merged with the output stream on pipeline invocation.

    • Property name: MergeWarning.

    • Property Type: PipelineResultTypes (see section 2.2.3.31).

  • A flag indicating to the higher layer whether the verbose stream is to be merged with the output stream on pipeline invocation.

    • Property name: MergeVerbose.

    • Property Type: PipelineResultTypes (see section 2.2.3.31).

  • A flag indicating to the higher layer whether the debug stream is to be merged with the output stream on pipeline invocation.

    • Property name: MergeDebug.

    • Property Type: PipelineResultTypes (see section 2.2.3.31).

  • Arguments of the command.

    • Property name: Args.

    • Property type: List (see section 2.2.5.2.6.3) of individual command parameter objects (see section 2.2.3.13) in the order they appear in the command invocation.

The Complex Object described in this section SHOULD have no associated type names (see section 2.2.5.2.3).

For an example, see section 2.2.2.10.