Set-VMHostAccount
This cmdlet configures a host account. When configuring a host user account, you can include or exclude the user from the specified groups. When configuring a host group account, you can include or exclude the specified users from this group.
Syntax
[-AssignUsers <String[]>]
[-Server <VIServer[]>]
[-UnassignUsers <String[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
HostGroupAccount[] | named |
|
Specifies the host group account you want to configure. Starting with ESXi 5.1, you cannot configure group host accounts. | optional |
|
String[] | named |
|
If a group host account is configured, specify the users you want to add to the account. Starting with ESXi 5.1, you cannot configure group host accounts. | 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. | optional |
|
String[] | named |
|
If a group host account is to be configured, specifies the users you want to remove from the account. |
[-AssignGroups <String[]>]
[-Description <String>]
[-GrantShellAccess <Boolean>]
[-Password <String>]
[-Server <VIServer[]>]
[-UnassignGroups <String[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
HostUserAccount[] | named |
|
Specifies the host user account you want to configure. | optional |
|
String[] | named |
|
If a user host account is to be configured, specifies the group to which you want to add the account. Starting with ESXi 5.1, you cannot configure group host accounts. | optional |
|
String | named |
|
Provides a description of the specified account. The maximum length of the text is 255 symbols. | optional |
|
Boolean | named |
|
Indicates that the account is allowed to access the ESX shell. | optional |
|
String | named |
|
Specifies a new password for the account. | 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. | optional |
|
String[] | named |
|
If a user host account is to be configured, specifies a group from which you want to remove the account. Starting with ESXi 5.1, you cannot configure group host accounts. |
Output
VMware.VimAutomation.ViCore.Types.V1.Host.Account.HostAccount
Examples
Example 1
Creates a user account with an ID MyUser1. Then creates a group account with an ID MyGroup1 and assigns the user account MyUser1 to the group account MyGroup1. Finally, excludes the MyUser1 account from the MyGroup1 account. Starting with ESXi 5.1, you cannot configure 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