Instead of Adding an ESXi host to the Active Directory manually below, is there a way to use powercli or other scripting languages to add the ESXi to the Domain/LDAP?
1. Logon to the host or the vCenter Server using the FAT-Client
2. From the Inventory menu – select Host and Clusters
3. Select the Host you wish to Add to Active Directory
4. Click the Configuration Tab
5. Select Authentication Services from the left window pane
6. Select properties link at the top right pane
7. In the Directory Services Configuration dialog, select the directory service from the dropdown.
8. Select Active Directory
9. Enter a domain you wish to join
a. Example: domain.local (FQDN) NOT Netbios
b. *** Please Note you must have permissions to join to domain ***
10. Click Join Domain.
11. Enter the user name (in email@example.com format) and password of a directory service user account that has permissions to join the host to the domain
a. Example: firstname.lastname@example.org
12. Click OK.
13. Click OK to close the Directory Services Configuration dialog box.