powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-DeployRule



NAME
Set-DeployRule

SYNOPSIS
Updates an existing rule.

SYNTAX
Set-DeployRule [-DeployRule] [-Name ] [-Pattern ] [-AllHosts] [-Item >] []


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.

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


PARAMETERS
-DeployRule
The rule to be changed. Use the DeployRule or the Name parameter to specify the rule.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Name
Name of the rule to apply changes to. Use the DeployRule or the Name parameter to specify the rule.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Pattern
Pattern that identifies the hosts to apply the rule to. Specify either AllHosts or Pattern.

Pattern strings use the following syntax:

== Adds a pattern that exactly matches the specified value against the specified attribute. Us
e this syntax if you need to match a string that contains a comma.

=[,val2,... ,valN] Adds a pattern that matches against the comma-separated list of values.

Supported value types are:

string Exact string match
- Range of IPv4 addresses.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-AllHosts
Specify AllHosts to apply the changed rule to all hosts. Specify either AllHosts or Pattern.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Item
Item to apply to the specified hosts. The item can be an image profile, 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.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
VMware.DeployAutomation.Types.DeployRule


NOTES




-------------- 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.






RELATED LINKS
Copy-DeployRule
New-DeployRule