You specify the rules that assign image profiles and host profiles to hosts using a set of PowerCLI cmdlets that are included in PowerCLI.
If you are new to PowerCLI, read the PowerCLI documentation and review Using vSphere Auto Deploy Cmdlets. You can get help for any command at the PowerShell prompt.
- Basic help: Get-Help cmdlet_name
- Detailed help: Get-Help cmdlet_name -Detailed
Note: When you run vSphere Auto Deploy cmdlets, provide all parameters on the command line when you invoke the cmdlet. Supplying parameters in interactive mode is not recommended.
Command | Description |
---|---|
Get-DeployCommand | Returns a list of vSphere Auto Deploy cmdlets. |
New-DeployRule | Creates a new rule with the specified items and patterns. |
Set-DeployRule | Updates an existing rule with the specified items and patterns. You cannot update a rule that is part of a rule set. |
Get-DeployRule | Retrieves the rules with the specified names. |
Copy-DeployRule | Clones and updates an existing rule. |
Add-DeployRule | Adds one or more rules to the working rule set and, by default, also to the active rule set. Use the NoActivate parameter to add a rule only to the working rule set. |
Remove-DeployRule | Removes one or more rules from the working rule set and from the active rule set. Run this command with the -Delete parameter to completely delete the rule. |
Set-DeployRuleset | Explicitly sets the list of rules in the working rule set. |
Get-DeployRuleset | Retrieves the current working rule set or the current active rule set. |
Switch-ActiveDeployRuleset | Activates a rule set so that any new requests are evaluated through the rule set. |
Get-VMHostMatchingRules | Retrieves rules matching a pattern. For example, you can retrieve all rules that apply to a host or hosts. Use this cmdlet primarily for debugging. |
Test-DeployRulesetCompliance | Checks whether the items associated with a specified host are in compliance with the active rule set. |
Repair-DeployRulesetCompliance | Given the output of Test-DeployRulesetCompliance, this cmdlet updates the image profile, host profile, and location for each host in the vCenter Server inventory. The cmdlet might apply image profiles, apply host profiles, or move hosts to prespecified folders or clusters on the vCenter Server system. |
Apply-EsxImageProfile | Associates the specified image profile with the specified host. |
Get-VMHostImageProfile | Retrieves the image profile in use by a specified host. This cmdlet differs from the Get-EsxImageProfile cmdlet in vSphere ESXi Image Builder. |
Repair-DeployImageCache | Use this cmdlet only if the vSphere Auto Deploy image cache is accidentally deleted. |
Get-VMHostAttributes | Retrieves the attributes for a host that are used when the vSphere Auto Deploy server evaluates the rules. |
Get-DeployMachineIdentity | Returns a string value that vSphere Auto Deploy uses to logically link an ESXi host in vCenter Server to a physical machine. |
Set-DeployMachineIdentity | Logically links a host object in the vCenter Server database to a physical machine. Use this cmdlet to add hosts without specifying rules. |
Get-DeployOption | Retrieves the vSphere Auto Deploy global configuration options. This cmdlet currently supports the vlan-id option, which specifies the default VLAN ID for the ESXi Management Network of a host provisioned with vSphere Auto Deploy. vSphere Auto Deploy uses the value only if the host boots without a host profile. |
Set-DeployOption | Sets the value of a global configuration option. Currently supports the vlan-id option for setting the default VLAN ID for the ESXi Management Network. |
Add-ProxyServer | Adds a proxy server to the vSphere Auto Deploy database. Run the command with the -Address parameter to specify the IPv4 or IPv6 address. The address can include a port number. |
List-ProxyServer | Lists the proxy servers that are currently registered with vSphere Auto Deploy. |
Delete-ProxyServer | Deletes one or more proxy servers from the list of proxy servers that are registered with vSphere Auto Deploy. You can run the command with the -id parameter from the list of proxy servers or with the-Address parameter by specifying the IPv4 or IPv6 address of the proxy server you want to delete. |
Add-ScriptBundle | Adds one or more script bundles to the vSphere Auto Deploy server. |
Get-ScriptBundle | Retrieves the list of script bundles available on the vSphere Auto Deploy server and the scripts they contain. |
Remove-ScriptBundle | Removes a script bundle from vSphere Auto Deploy. Applicable for vSphere version 6.7 and later. |
Get-CustomCertificate | Retrieves the custom host certificate uploaded into AutoDeploy. You must run the command with the -HostId [MAC_Address | BIOS_UUID] parameter. The first time you add custom certificates, you don't see any certificates returned by this cmdlet. |
List-CustomCertificates | Retrieves information about all custom host certificates used by Auto Deploy. The list provides details for the name of the certificate, Host ID, and Associated Host Name, which reflects the name of the vCenter Server for the Auto Deploy server. |
Add-CustomCertificate | Adds a custom certificate to the VMware Endpoint Certificate Store and associates it with an ESXi host. The certificate becomes active upon host reboot. You can use the Get-CustomCertificate cmdlet to retrieve the custom host certificate key. You can run the command with the -HostId [MAC_Address | BIOS_UUID] parameter to associate the certificate to the host, specifying a -Key [file:///path/to/key.key] and -Cert [file:///path/to/cert.crt]. Using this cmdlet requires the AutoDeploy.Rule.Create privilege on the root folder of vCenter Server. |
Remove-CustomCertificate | Removes a set of custom host certificates from Auto Deploy. The certificate entries are deleted from the database and the certificate files are removed from the filestore. Hosts that have already booted with a custom certificate must be rebooted to receive a new certificate. You must provide at least one of -Cert or -HostId parameters. Using this cmdlet requires the AutoDeploy.Rule.Create privilege on the root folder of vCenter Server. |