Updated: April 27, 2016
Applies To: Windows PowerShell
Assembly: System.Management.Automation (in System.Management.Automation.dll)
Creates a newobject that contains the command to be run.
Creates a new Boolean value that indicates whether the object contains a script.object that contains a command and a
|Command(String, Boolean, Boolean)|
Creates a new Boolean values that indicate whether the object contains a script and whether the local scope should be used when invoking the script.object that contains a cmdlet or script to run, plus two
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.
Gets the command name or script of theobject.
Checks if the current command marks the end of a statement (see PowerShell.AddStatement())
Gets a Boolean value that indicates whether the object contains a script.
Gets and sets PipelineResultTypes constants that specify what output streams are merged for previous unclaimed command results.
Gets the parameters for the command.
Gets a Boolean value that indicates whether the object should be run in its own local scope.
Merges the results that thiswrites to one stream (such as its Error stream) with the results of another stream (such as the Output stream).
Generates a string representation of the current Object.ToString().)object.(Overrides
Theobject can be used in two ways.
Windows PowerShell provides two classes that can define a command. The PSCommand class allows you to build a pipeline of commands (A|B|C) that contain one or more cmdlets and scripts. In contrast, the class allows you to specify only a single cmdlet or script in the command.
This class cannot be inherited.
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.