8.0

Table Of Contents
The cmdlet might return a server certificate warning. In a production environment, make
sure no server certificate warnings result. In a development environment, you can ignore the
warning.
2 Run the Add-ScriptBundle cmdlet to add the script bundle that contains the necessary
scripts to the vSphere Auto Deploy inventory.
Add-ScriptBundle c:/temp/MyScriptBundle.tgz
The name of the script bundle without the .tgz extension is the name identifier or object
of the script bundle item. You can update an existing script bundle by using the
-Update
parameter with the Add-ScriptBundle cmdlet.
3 (Optional) Run the Get-ScriptBundle cmdlet to verify that the script bundle is added to the
vSphere Auto Deploy inventory.
4 Define a rule in which hosts with certain attributes, for example a range of IP addresses, are
assigned to the script bundle.
New-DeployRule -Name "testrule4" -Item "MyScriptBundle" -Pattern "vendor=Acme,Zven",
"ipv4=192.XXX.1.10-192.XXX.1.20"
Double quotes are required if a name contains spaces, optional otherwise. Specify -AllHosts
instead of a pattern to apply the item to all hosts.
You create a rule named
testrule4
. The rule assigns the script bundle named My Script Bundle
to all hosts with a vendor of Acme or Zven that also have an IP address in the specified
range. You can use the name identifier of the script bundle or the object returned by the
Get-ScriptBundle cmdlet to identify the script bundle you want to associate with the rule.
5 Add the rule to the rule set.
Add-DeployRule testrule4
By default, the rule is added to both the working rule set and the active rule set. If you use the
NoActivate parameter, the working rule set does not become the active rule set.
What to do next
n For hosts already provisioned with vSphere Auto Deploy, perform the compliance testing
and repair operations to provision them with the new scripts. See Test and Repair Rule
Compliance .
n Turn on unprovisioned hosts to provision them with the new scripts.
Test and Repair Rule Compliance
When you add a rule to the vSphere Auto Deploy rule set or modify one or more rules, hosts are
not updated automatically. vSphere Auto Deploy applies the new rules only when you test their
rule compliance and perform remediation.
VMware ESXi Installation and Setup
VMware, Inc. 136