Get-VIAccount

This cmdlet retrieves the accounts from the ESX/ESXi or vCenter Server. The Group and User switch parameters let you retrieve group and user accounts. By default, the cmdlet lists only user accounts. If the Domain parameter is specified, the cmdlet retrieves only the accounts on the specified AD domain. Otherwise, only local accounts are listed.

Syntax

[-Group]
[-Name  <String[]>]
[-Server  <VIServer[]>]
[-User]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional
Group
SwitchParameter named Specifies that you want to retrieve only group accounts.
optional
Name
String[] named
  • wildcards
  • Specifies the names of the accounts you want to retrieve.
    optional
    Server
    VIServer[] named
  • wildcards
  • pipeline
  • 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
    User
    SwitchParameter named Specifies that you want to retrieve only user accounts.

    [-Domain  <String>]
    [-Group]
    [-Id  <String[]>]
    [-Server  <VIServer[]>]
    [-User]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    optional
    Domain
    String named
  • wildcards
  • Specifies AD domains to search for accounts.
    optional
    Group
    SwitchParameter named Specifies that you want to retrieve only group accounts.
    optional
    Id
    String[] named
  • wildcards
  • Specifies the IDs of the accounts you want to retrieve.
    optional
    Server
    VIServer[] named
  • wildcards
  • pipeline
  • 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
    User
    SwitchParameter named Specifies that you want to retrieve only user accounts.

    Output

    VMware.VimAutomation.ViCore.Types.V1.PermissionManagement.VIAccount

    Examples


    Example 1

    Get-VIAccount -Id Administrator

    Retrieve accounts by Id.

    Example 2

    Get-VIAccount -Group

    Retrieve all group accounts.

    Example 3

    Get-VIAccount -Id Administrator -Domain "MSDomain"

    Get all VIAccounts for specified ID and Domain.

    Example 4

    Get-VIAccount -Domain "MSDomain"

    Retrieve all accounts for the specified domain.

    Related Commands

    Feedback

    Was this page helpful?