6.5.1

Table Of Contents
5 Run Copy-DeployRule and specify the ReplaceItem parameter to change the rule that assigns an
image profile to hosts.
The following cmdlet replaces the current image profile that the rule assigns to the host with the
my_new_imageprofile profile. After the cmdlet completes, myrule assigns the new image profile to
hosts. The old version of myrule is renamed and hidden.
Copy-DeployRule myrule -ReplaceItem my_new_imageprofile
6 Test the rule compliance for each host that you want to deploy the image to.
a Verify that you can access the host for which you want to test rule set compliance.
Get-VMHost -Name ESXi_hostname
b Run the cmdlet that tests rule set compliance for the host, and bind the return value to a variable
for later use.
$tr = Test-DeployRuleSetCompliance ESXi_hostname
c Examine the differences between the contents of the rule set and configuration of the host.
$tr.itemlist
The system returns a table of current and expected items if the host for which you want to test the
new rule set compliance is compliant with the active rule set.
CurrentItem ExpectedItem
----------- ------------
my_old_imageprofile my_new_imageprofile
d Remediate the host to use the revised rule set the next time you boot the host.
Repair-DeployRuleSetCompliance $tr
7 Reboot the host to provision it with the new image profile.
Reprovision a Host with a New Image Profile by Using the vSphere Web Client
You can use vSphere Auto Deploy to reprovision a host with a new image profile with the
vSphere Web Client by changing the rule that the host corresponds to and activating the rule.
Prerequisites
n
Verify that the image profile you want to use to reprovision the host is available. See Create an Image
Profile.
n
Verify that the setup you performed during the first boot operation is in place.
vSphere Installation and Setup
VMware, Inc. 156