vSphere PowerCLI Reference

Set-DeployRuleSet

Synopsis

Sets the list of rules in the working rule set.

Syntax

Set-DeployRuleSet [-DeployRule] <DeployRule[]> [-NoActivate] [<CommonParameters>]
Set-DeployRuleSet -Clear [-NoActivate] [<CommonParameters>]

Related Commands

Add-DeployRule
Remove-DeployRule

Detailed Description

Explicitly sets the list of rules in the working rule set. By default, the change to the working set is immediately activated.

Use the -Clear option to remove all rules from the working rule set.

You must have the "AutoDeploy.RuleSet.Edit" privilege on the root folder of vCenter Server to use this cmdlet.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
DeployRuleDeployRule[]The array of rules that will make up the rule set.truetrue (ByValue)
ClearSwitchParameterRemoves all rules from the working rule set.truefalse
NoActivateSwitchParameterSpecify the NoActivate parameter to apply the change to the working rule set but not to the active rule set.falsefalse

Return Type

VMware.DeployAutomation.Types.DeployRuleSet

Notes

Examples

-------------- Example 1 --------------

C:\PS> Get-DeployRule "testrule", "rule2" | Set-DeployRuleSet

Removes all rules from the working rule set and adds the rules named testrule and rule2.


Copyright © VMware, Inc. All rights reserved.