Get-VMHostAccount
This cmdlet retrieves the host accounts available on a vCenter Server system. If both User and Group parameters are set to $true, in the list returned by the command, group accounts come out on top. If none of the User and Group switch parameters are provided, the cmdlet retrieves only the user accounts. If the ID parameter is set, the cmdlet filters the host accounts by their IDs. To specify a server different from the default one, use the Server parameter. Note: The specified server must be an ESX/ESXi host.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional |
|
SwitchParameter | named |
|
Indicates that you want to retrieve only group host accounts. Starting with ESXi 5.1, this parameter is not supported. | optional |
|
String[] | named |
|
Specifies the IDs of the host accounts you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list. | 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 |
|
SwitchParameter | named |
|
Indicates that you want to retrieve only user host accounts. |
Output
VMware.VimAutomation.ViCore.Types.V1.Host.Account.HostAccount
Examples
Example 1
Retrieves the group accounts for the default ESX/ESXi host. Starting with ESXi 5.1, you cannot retrieve group accounts.
Example 2
Retrieves a host account specified by an ID and an ESX/ESXi host.
Example 3
Retrieves a group host account specified by an ID and an ESX/ESXi host. Starting with ESXi 5.1, you cannot retrieve group host accounts.
Example 4
Retrieves all user and group accounts on a specified ESX/ESXi host. Starting with ESXi 5.1, you cannot retrieve 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