Add vCenter Server 6.7 to an Active Directory Domain from the command line

Problem:

How do I add my vCenter server to my Active Directory domain from the command line?

Solution:

To add the VCSA to an Active Directory domain login to vCenter and start a shell session:

shell.set --enabled true

shell

Then run the below command to join the chosen domain:

/opt/likewise/bin/domainjoin-cli join domain.com Domain_Administrator Password

 

You can then reboot the VCSA.

To check that the domain join is successful run the command:

/opt/likewise/bin/domainjoin-cli query

 

You can also query which domain controllers are available:

/opt/likewise/bin/lw-get-dc-list <domain_name>

 

If there is an issue you can leave the domain and try again:

/opt/likewise/bin/domainjoin-cli leave domain.com

Leave a Reply

Your email address will not be published. Required fields are marked *