Auto Deploy can assign a host to a folder or cluster. When the host boots, Auto Deploy adds it to the specified location on the vCenter Server. Hosts assigned to a cluster inherit the cluster's host profile.

The following procedure explains how to write a rule that assigns a host to a folder or cluster. To assign a host already provisioned with Auto Deploy to a new folder or cluster, you must also perform a test and repair cycle. See Test and Repair Rule Compliance.


The folder you select must be in a datacenter or in a cluster. You cannot assign the host to a standalone top-level folder.

Install VMware PowerCLI and all prerequisite software.

If you encounter problems running PowerCLI cmdlets, consider changing the execution policy. See Using Auto Deploy Cmdlets.


Run the Connect-VIServer PowerCLI cmdlet to connect to the vCenter Server system that Auto Deploy is registered with.

Connect-VIServer 192.XXX.X.XX

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.


Define a rule in which hosts with certain attributes, for example a range of IP addresses, are assigned to a folder or a cluster.

New-DeployRule -Name "testrule3" -Item "my folder" -Pattern "vendor=Acme,Zven", "ipv4=192.XXX.1.10-192.XXX.1.20"

This example passes in the folder by name. You can instead pass in a folder, cluster, or datacenter object that you retrieve with the Get-Folder, Get-Cluster, or Get-Datacenter cmdlet.


Add the rule to the rule set.

Add-DeployRule testrule3

By default, the working rule set becomes the active rule set, and any changes to the rule set become active when you add a rule. If you use the NoActivate parameter, the working rule set does not become the active rule set.

Upgrade existing hosts to be added to the specified vCenter Server location by performing test and repair compliance operations on those hosts. See Test and Repair Rule Compliance.

Turn on unprovisioned hosts to add them to the specified vCenter Server location.