Get-MembersOfGroup
SYNOPSIS
Gets the members of a group.
SYNTAX
Get-MembersOfGroup [-Group] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
This function will return a list of members of a group. If a group is specified then only the members of that group will be returned.
EXAMPLES
EXAMPLE 1
This will return the members of the Administrators group.
Get-MembersOfGroup -Group (Get-Group -Name 'Administrators');
PARAMETERS
-Group
The group to retrieve the members of.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
[ADSI[]] - A list of ADSI objects representing the members of the group.
NOTES
This function is designed to work with the ADSI provider for the local machine. It will not work with remote machines or other providers.