In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzureADMSDeletedGroup PowerShell command with an example of how to use this command.
Table of Contents
Get-AzureADMSDeletedGroup
This Azure PowerShell command can help you to retrieve the soft deleted groups in an Azure Active Directory.
Syntax
Below is the syntax of the Get-AzureADMSDeletedGroup PowerShell command.
Get-AzureADMSDeletedGroup
Get-AzureADMSDeletedGroup
-Id <String>
Get-AzureADMSDeletedGroup
[-SearchString <String>]
Let’s discuss a few examples of the usage of the Get-AzureADMSDeletedGroup PowerShell command.
Example-1:
You can use the below PowerShell command to get the lists of soft-deleted groups from my Azure Active Directory.
Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
Get-AzureADMSDeletedGroup
After execution, I got the expected output successfully.
Id : 6472abc0-dcaf-4739-b1ed-24f043d5227d
OdataType :
AssignedLabels :
CreatedDateTime : 12/3/2021 5:57:08 AM
Description :
OnPremisesSyncEnabled :
DeletedDateTime : 5/24/2023 5:21:31 PM
DisplayName : TSInfo Team
IsAssignableToRole :
IsManagementRestricted :
OnPremisesLastSyncDateTime :
Mail : TSInfoTeam@fewlines4bijuhotmail.onmicrosoft.com
MailEnabled : True
MailNickname : TSInfoTeam
OnPremisesSecurityIdentifier :
ProxyAddresses : {SMTP:TSInfoTeam@fewlines4bijuhotmail.onmicrosoft.com}
SecurityEnabled : False
GroupTypes : {Unified}
MembershipRule :
MembershipRuleProcessingState :
Visibility : Private
RenewedDateTime : 12/3/2021 5:57:08 AM
You can see the same output as below.

Example-2:
You can also retrieve the soft-deleted groups based on the specified ID using the below PowerShell command.
Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
Get-AzureADMSDeletedGroup -Id 6472abc0-dcaf-4739-b1ed-24f043d5227d
After executing the above command, I got the expected output as shown below

Check out below video tutorial on the Get-AzureADMSDeletedGroup PowerShell command.
Final Thoughts
Well, In this article, we discussed the syntax and usage of the Get-AzureADMSDeletedGroup PowerShell command with a few examples of how to use this command. Thanks for reading this article !!!