PowerShell.AddParameters Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddParameters(IDictionary) |
Adds a set of parameters to the last added command. |
AddParameters(IList) |
Adds a set of parameters to the last added command. |
AddParameters(IDictionary)
Adds a set of parameters to the last added command.
public:
System::Management::Automation::PowerShell ^ AddParameters(System::Collections::IDictionary ^ parameters);
public System.Management.Automation.PowerShell AddParameters (System.Collections.IDictionary parameters);
member this.AddParameters : System.Collections.IDictionary -> System.Management.Automation.PowerShell
Public Function AddParameters (parameters As IDictionary) As PowerShell
Parameters
- parameters
- IDictionary
Dictionary of parameters. Each key-value pair corresponds to a parameter name and its value. Keys must strings.
Returns
A PowerShell instance with the items in parameters
added
to the parameter list of the last command.
Exceptions
The function was given a null argument.
Powershell instance cannot be changed in its current state.
One of the dictionary keys is not a string.
Remarks
This method is not thread safe.
Applies to
AddParameters(IList)
Adds a set of parameters to the last added command.
public:
System::Management::Automation::PowerShell ^ AddParameters(System::Collections::IList ^ parameters);
public System.Management.Automation.PowerShell AddParameters (System.Collections.IList parameters);
member this.AddParameters : System.Collections.IList -> System.Management.Automation.PowerShell
Public Function AddParameters (parameters As IList) As PowerShell
Parameters
- parameters
- IList
List of parameters.
Returns
A PowerShell instance with the items in parameters
added
to the parameter list of the last command.
Exceptions
The function was given a null argument.
Powershell instance cannot be changed in its current state.
Remarks
This method is not thread safe.