< Back
Get-VIAccount
Post
NAME Get-VIAccount
SYNOPSIS
This cmdlet retrieves the accounts from the ESX/ESXi or vCenter Server.
SYNTAX
Get-VIAccount [[-Id] <String[]>] [-Domain <String>] [-Group] [-Server <VIServer[]>] [-User] [<CommonParameters>]
Get-VIAccount [[-Name] <String[]>] [-Group] [-Server <VIServer[]>] [-User] [<CommonParameters>]
DESCRIPTION
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.
PARAMETERS
-Domain <String>
Specifies AD domains to search for accounts.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Group [<SwitchParameter>]
Specifies that you want to retrieve only group accounts.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Id <String[]>
Specifies the IDs of the 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.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Name <String[]>
Specifies the names of the accounts you want to retrieve.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-User [<SwitchParameter>]
Specifies that you want to retrieve only user accounts.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Zero or more VIAccount objects
NOTES
-------------------------- 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 LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... count.html
New-VMHostAccount
Set-VMHostAccount
Remove-VMHostAccount
SYNOPSIS
This cmdlet retrieves the accounts from the ESX/ESXi or vCenter Server.
SYNTAX
Get-VIAccount [[-Id] <String[]>] [-Domain <String>] [-Group] [-Server <VIServer[]>] [-User] [<CommonParameters>]
Get-VIAccount [[-Name] <String[]>] [-Group] [-Server <VIServer[]>] [-User] [<CommonParameters>]
DESCRIPTION
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.
PARAMETERS
-Domain <String>
Specifies AD domains to search for accounts.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Group [<SwitchParameter>]
Specifies that you want to retrieve only group accounts.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Id <String[]>
Specifies the IDs of the 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.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Name <String[]>
Specifies the names of the accounts you want to retrieve.
Required? false
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-User [<SwitchParameter>]
Specifies that you want to retrieve only user accounts.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Zero or more VIAccount objects
NOTES
-------------------------- 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 LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... count.html
New-VMHostAccount
Set-VMHostAccount
Remove-VMHostAccount