Get-AzADGroup

Filters active directory groups.

Syntax

Get-AzADGroup
   [-ObjectId <Guid>]
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzADGroup
   -DisplayNameStartsWith <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzADGroup
   -DisplayName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzADGroup
   -ObjectId <Guid>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]

Description

Filters active directory groups.

Examples

Example 1 - List all AD groups

PS C:\> Get-AzADGroup

Lists all AD groups in a tenant.

Example 2 - List all AD groups using paging

PS C:\> Get-AzADGroup -First 100

Lists the first 100 AD groups in a tenant.

Example 3 - Get AD group by object id

PS C:\> Get-AzADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE

Gets an AD group with object id '85F89C90-780E-4AA6-9F4F-6F268D322EEE'.

Example 4 - List groups by search string

PS C:\> Get-AzADGroup -SearchString Joe

Lists all AD groups whose display name begins with 'Joe'.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

The display name of the group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayNameStartsWith

Used to find groups that begin with the provided string.

Type:String
Aliases:SearchString
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-First

The maximum number of objects to return.

Type:UInt64
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IncludeTotalCount

Reports the number of objects in the data set. Currently, this parameter does nothing.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ObjectId

Object id of the group.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Skip

Ignores the first N objects and then gets the remaining objects.

Type:UInt64
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Guid

Outputs

Microsoft.Azure.Commands.ActiveDirectory.PSADGroup