vmware / pyvmomi-community-samples

A place for community contributed samples for the pyVmomi library.
Apache License 2.0
1.02k stars 922 forks source link

How to create a new user local using api #661

Open fabisd opened 3 years ago

fabisd commented 3 years ago

Hello, I need to create a new vsphere.local user using api. So far I have not been successful.

I tried something like:

user_spec = vim.HostAccountSpec () user_spec.id = 'test' user_spec.password = 'GfthjsieY73' vim.LocalAccountManager.CreateUser (user = user_spec)

Does anyone have an example of how to do this?