다음을 통해 공유


Get-MsolGroupMember

Updated: July 30, 2015

Applies To: Azure, Office 365, Windows Intune

Note



  • The cmdlets were previously known as the Microsoft Online Services Module for Windows PowerShell cmdlets.

The Get-MsolGroupMember cmdlet is used to retrieve members of the specified group. The members can be either users or groups.

Syntax

Get-MsolGroupMember [-All] [-GroupObjectId <Guid>] [-SearchString <string>] [-TenantId <Guid>] [<CommonParameters>]

Parameters

    -All [<SwitchParameter>]
        If present then all results will be returned.  Cannot be used with 
        MaxResults parameter.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false
        
    -GroupObjectId <Guid>
        The ID of the group to retrieve members for.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false
        
    -MaxResults <int>
        The maximum number of results returned for a search result. If not 
        specified, 250 results will be returned.
        
        Required?                    false
        Position?                    named
        Default value                250
        Accept pipeline input?       false
        Accept wildcard characters?  false
        
    -SearchString <string>
        The string to search on. Only objects with a display name or email 
        address starting with this string will be returned.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false
        
    -TenantId <Guid>
        The unique ID of the tenant to perform the operation on. If this is 
        not provided, then the value will default to the tenant of the current 
        user. This parameter is only applicable to partner users.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false
        
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer and OutVariable. For more information, type,
        "get-help about_commonparameters".

Examples

The output is provided by Microsoft.Online.Administration.GroupMember. For this cmdlet, each output object will include the following:

  1. CommonName: The common name of the group.

  2. DisplayName: The display name of the group.

  3. EmailAddress: The primary email address of the group (for MailEnabled groups only).

  4. GroupMemberType: The group type (SecurityGroup, Distributionlist, or MailEnabledSecurityGroup).

  5. ObjectId: The unique ID of the group.

Example 1

The following command returns a list of group member objects.

Get-MsolGroupMember -groupObjectid <id>

Additional Resources

There are several other places you can get more information and help. These include:

See Also

Other Resources

Manage Azure Active Directory by using Windows PowerShell