You can use the API to create a user account on an ESXi system.

Procedure

  1. Obtain a managed object reference to the HostLocalAccountManager of the target system.
  2. 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.

  3. Call the HostLocalAccountManager.CreateUserAccount method, passing in the managed object reference (from step 1) and the HostAccountSpec data object (step 2).

    After creating user accounts on the ESXi system, you can grant these users access to virtual components by using AuthorizationManager methods. See Managing Roles and Permissions with AuthorizationManager.