The supported method of joining an ESXi host to the domain is from the UI.
To add an ESXi host to the Active Directory using vSphere Client (HTML5):
Notes:
Impact/Risks:
Joining an ESXi hosts to an Active Directory domain with a read-only domain controller (RODC) is unsupported. You can join an ESXi hosts only to an Active Directory domain with a writable domain controller.