You can use the API to create a user account on an ESXi system.
Procedure
- Obtain a managed object reference to the HostLocalAccountManager of the target system.
- Create a HostAccountSpec data object that defines the properties of the user account, including description and password.
Define account names and passwords according to the configuration required by your ESXi system for user account naming conventions and password requirements, such as minimum length, character set, and other requirements.
- Call the HostLocalAccountManager.CreateUserAccount method, passing in the managed object reference (from step 1) and the HostAccountSpec data object (step 2).