Get-AzureADMSGroup

In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzureADMSGroup PowerShell command with examples of how to use this particular command.

Get-AzureADMSGroup

This is an excellent PowerShell command to get the details of the Azure AD groups via the MS Graph.

Syntax of Get-AzureADMSGroup

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

Get-AzureADMSGroup
Get-AzureADMSGroup 
-Id <String>
Get-AzureADMSGroup
 [-SearchString <String>]

Well, let’s discuss a few examples of how to use the Get-AzureADMSGroup PowerShell command.

Example-1:

You can execute the below Azure PowerShell command to get the details of the lists of the Azure AD groups via MS Graph.

Get-AzureADMSGroup

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

PS C:\WINDOWS\system32> Get-AzureADMSGroup

Id                                   DisplayName           Description                
--                                   -----------           -----------                
26a1666e-6584-4afe-9218-44b0dd452426 NewTsInfoGroup        This Group belongs to Ts...
a1aa1efb-37de-4a23-80f5-a6848aa9e9fe NewTSGroup                                       
d7496713-3252-4601-afa8-d3d8b86dea72 AAD DC Administrators     

Check out the same output below

Get-AzureADMSGroup

Example-2:

Execute the below PowerShell command to retrieve the details of the Azure AD group based on the specified filter condition.

Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228 
Get-AzureADMSGroup -Filter "startswith(DisplayName,'NewTSGroup')"

After executing the above command, I got the expected output, as shown in the screenshot below.

get-azureadmsgroup -filter

Example-3:

You can execute the below PowerShell command to get the details of a specified Azure AD group via MS Graph based on the ID specified.

Get-AzureADMSGroup -Id 26a1666e-6584-4afe-9218-44b0dd452426

After executing the PowerShell command, I got the expected output, as shown below.

get-azureadmsgroup filter example

Get-AzureADMSGroup – Video Tutorial

You can check out a Video tutorial on Get-AzureADMSGroup Command.

Final Thoughts

In this Azure PowerShell article, we discussed the syntax and usage of the Get-AzureADMSGroup PowerShell command with examples of how to use the Get-AzureADMSGroup command. Thanks for reading this article !!!