Get-AzADGroup

In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzADGroup PowerShell command with examples.

Get-AzADGroup

This is an excellent Azure PowerShell cmdlet to get the lists of Azure Active Directory Groups.

Syntax

Below is the syntax of the Get-AzADGroup PowerShell command.

Get-AzADGroup
Get-AzADGroup -DisplayName <String>
Get-AzADGroup -ObjectId <Guid>

Let’s discuss a few examples of how to use the Get-AzADGroup PowerShell command.

Example-1:

Execute the below PowerShell command to get the lists of Azure Active Directory Groups.

Get-AzADGroup

After running the above PowerShell command, I got the below output.

DisplayName           Id                                   MailNickname        Descrip
                                                                               tion   
-----------           --                                   ------------        -------
TsInfoGroup           26a1666e-6584-4afe-9218-44b0dd452426 TsInfoGroup         This...
TSInfo Team           6472abc0-dcaf-4739-b1ed-24f043d5227d TSInfoTeam                 
NewTSGroup            a1aa1efb-37de-4a23-80f5-a6848aa9e9fe 1f76990c-0                 
DemoGroup             c08b54dd-7f86-4f18-9a5d-b4565d3b3319 ba0a94a9-3          Azur...
AAD DC Administrators d7496713-3252-4601-afa8-d3d8b86dea72 AADDCAdministrators        

See the below screenshot for the same output

Get-AzADGroup

Example-2:

You can run the below PowerShell command to get the “TsInfoGroup” AD group details.

Get-AzADGroup -DisplayName TsInfoGroup

After running the above command, I got the below output

DisplayName Id                                   MailNickname Description             
----------- --                                   ------------ -----------             
TsInfoGroup 26a1666e-6584-4afe-9218-44b0dd452426 TsInfoGroup  This Group belongs to...

Check out the same output below

Get-AzADGroup PowerShell

Example-3:

You can run the below PowerShell command to get the AD group details with the Object ID “a1aa1efb-37de-4a23-80f5-a6848aa9e9fe”.

Get-AzADGroup -ObjectId a1aa1efb-37de-4a23-80f5-a6848aa9e9fe

After executing the PowerShell command, I got the below output.

DisplayName Id                                   MailNickname Description
----------- --                                   ------------ -----------
NewTSGroup  a1aa1efb-37de-4a23-80f5-a6848aa9e9fe 1f76990c-0              

You can see the same output below.

Get-AzADGroup PowerShell command

You can use the Remove-AzADGroup PowerShell command to delete any unused Azure AD Groups.

You may also like following the below articles

Final Thoughts

Well, in this Azure PowerShell article, we discussed the syntax and usage of the Get-AzADGroup PowerShell command with examples of how to use the Get-AzADGroup PowerShell command to get the AD group. Thanks for reading this article !!!