New-VMHostAccount
This cmdlet creates a new host user or group account using the provided parameters.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String | named |
|
Specifies an ID for the new host account. | optional |
|
String[] | named |
|
If the GroupAccount parameter is set to $true, use AssignUsers to specify the users that belong to the newly created group account. | optional |
|
SwitchParameter | named |
|
Indicates that the new host account is a group account. Starting with ESXi 5.1, this parameter is not supported. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. Passing values to this parameter through a pipeline is deprecated and will be deactivated in a future release. |
-Id <String>
[-AssignGroups <String[]>]
[-Description <String>]
[-GrantShellAccess]
[-Server <VIServer[]>]
[-UserAccount]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String | 1 |
|
Specifies a password for the new host account. | required |
|
String | named |
|
Specifies an ID for the new host account. | optional |
|
String[] | named |
|
If the UserAccount parameter is set to $true, use AssignGroups to specify the groups to which the newly created user belongs. | optional |
|
String | named |
|
Provide a description of the new host account. The maximum length of the text is 255 symbols. | optional |
|
SwitchParameter | named |
|
Indicates that the new account is allowed to access the ESX shell. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. Passing values to this parameter through a pipeline is deprecated and will be deactivated in a future release. | optional |
|
SwitchParameter | named |
|
Indicates that the new host account is a user account. |
Output
VMware.VimAutomation.ViCore.Types.V1.Host.Account.HostAccount
Examples
Example 1
Creates a user account with a specified user ID and password. The user account is created on the default server.
Example 2
Creates a group account with a specified ID and assigns a specified user to the group account. Starting with ESXi 5.1, you cannot create group host accounts.
Related Commands
VMHost
VMHostAccount
VMHostAdvancedConfiguration
VMHostAuthentication
VMHostAvailableTimeZone
VMHostDiagnosticPartition
VMHostDisk
VMHostDiskPartition
VMHostFirewallDefaultPolicy
VMHostFirewallException
VMHostFirmware
VMHostHardware
VMHostHba
VMHostModule
VMHostNetwork
VMHostNetworkAdapter
VMHostNetworkStack
VMHostNtpServer
VMHostPatch
VMHostPciDevice
VMHostProfile
VMHostProfileCompliance
VMHostProfileImageCacheConfiguration
VMHostProfileRequiredInput
VMHostProfileStorageDeviceConfiguration
VMHostProfileUserConfiguration
VMHostProfileVmPortGroupConfiguration
VMHostRoute
VMHostService
VMHostSnmp
VMHostStartPolicy
VMHostStorage