Syntax
Add-DeployRule [-DeployRule] <DeployRule[]> [[-At] <UInt32>] [-NoActivate] [<CommonParameters>]Related Commands
Get-DeployRuleDetailed Description
Adds one or more rules to the working rule set and then activates the working rule set. The rule can be added at a specific index with the "-At" option, otherwise it is added to the end. If you plan on making several changes to the rule set, you can pass the "-NoActivate" option to avoid activing the rule set after every change.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
DeployRule | DeployRule[] | Rule(s) to add to the rule set. You can pass a DeployRule object here or the name of the rule. | true | true (ByValue) | |
At | UInt32 | Index in the rule set where you want to add the rule. The placement of the rule in the set determines its priority. Lower indexes have a higher priority. | false | false | |
NoActivate | SwitchParameter | Specify this parameter to add the rule to the working rule set but not to the active rule set. By default, the working rule set is activated after the change. | false | false |
Return Type
VMware.DeployAutomation.Types.DeployRuleSetNotes
Examples
-------------- Example 1 --------------
C:\PS> Get-DeployRule "testrule" | Add-DeployRule
Get a rule named "testrule" and add it to the end of the rule set.
-------------- Example 2 --------------
C:\PS> Add-DeployRule testrule -At 0
Add a rule named "testrule" to the beginning of the rule set.