PowerShell.AddCommand Method

Adds a cmdlet to the end of the pipeline of the PowerShell object. The variants of this method can add the command with or without specifying that the command should be run within a new local scope. This method is introduced in Windows PowerShell 2.0.

NameDescription
PowerShell.AddCommand (CommandInfo)Adds a cmdlet to the end of the pipeline of the PowerShell object by specifying a CommandInfo object.
PowerShell.AddCommand (String)Adds a command to the end of the pipeline of the PowerShell object by specifying the command name. This method is introduced in Windows PowerShell 2.0.
PowerShell.AddCommand (String, Boolean)Adds a cmdlet to the end of the pipeline of the PowerShell object, and specifies whether the cmdlet should be run within a new local scope. This method is introduced in Windows PowerShell 2.0.

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft