Syntax
Set-DeployRule [-DeployRule] <DeployRule> [-Name <String>] [-Pattern <String[]>] [-AllHosts] [-Item <VIObjectCore[]>] [<CommonParameters>]Related Commands
Copy-DeployRuleDetailed Description
Updates an existing rule with the specified items, patterns, or both. Rules cannot be changed once they have been used in the active rule set. Use Copy-DeployRule to make a copy of a rule with any desired changes.^MParameters
< td>falseName | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
DeployRule | DeployRule | The rule to be changed. Use the DeployRule or the Name parameter to specify the rule. | true | false | |
AllHosts | SwitchParameter | Specify AllHosts to apply the changed rule to all hosts. Specify either AllHosts or Pattern. | false | false | |
Item | VIObjectCore[] | Item to apply to the specified hosts. The item can be an image profile, a script bundle, a host profile, or a cluster or folder in a vCenter Server system. This parameter supports object-by-name, so you can pass the name of the item. | false | true (ByValue) | |
Name | String | Name of the rule to apply changes to. Use the DeployRule or the Name parameter to specify the rule. | false | ||
Pattern | String[] | Pattern that identifies the hosts to apply the rule to. Specify either AllHosts or Pattern. ^M ^M Pattern strings use the following syntax: ^M ^M <attr>==<value> Adds a pattern that exactly matches the specified value against the specified attribute. Use this syntax if you need to match a string that contains a comma.^M ^M <attr>=<Val1 >[,val2,... ,valN] Adds a pattern that matches against the comma-separated list of values. ^M ^M Supported value types are: ^M ^M string Exact string match^M <ip1>-<ip2> Range of IPv4 addresses. | false | false |
Return Type
VMware.DeployAutomation.Types.DeployRule 2Notes
Examples
-------------- Example 1 --------------
C:\PS> Set-DeployRule $rule -Pattern "ipv4=192.168.1.10-192.168.1.20"
Updates the rule to apply to the hosts with IPv4 addresses in the specified range.