MS-700 practice question 10 of 10

Your company has a Microsoft 365 subscription. An administrator reports that teams were deleted accidentally today. You need to restore the teams as quickly as possible. Which cmdlets should you run?

Full set: 420 questions
Answer options
A: Get-AzureADMSDeletedGroup and Restore-AzureADMSDeletedDirectoryObject Correct answer
B: Get-Team and Restore-ADObject
C: Get-AzureADMSDeletedGroup and Restore-ADObject
D: Get-AzureADGroup and Restore-AzureADMSDeletedDirectoryObject
E: Get-Team and Restore-AzureADMSDeletedDirectoryObject
Correct Answer:
A. Get-AzureADMSDeletedGroup and Restore-AzureADMSDeletedDirectoryObject
Explanation

A Microsoft Team is built upon a Microsoft 365 Group. When a team is deleted, the underlying group is soft-deleted and can be restored within 30 days. The correct procedure using PowerShell is to first identify the deleted group using the Get-AzureADMSDeletedGroup cmdlet. Then, using the Object ID of that deleted group, you run the Restore-AzureADMSDeletedDirectoryObject cmdlet to restore the group, which in turn restores the associated team and its content.

Why Incorrect

B. Get-Team only lists active teams, and Restore-ADObject is for on-premises Active Directory, not Azure AD.
C. Restore-ADObject is for on-premises Active Directory and cannot be used to restore an Azure AD object.
D. Get-AzureADGroup only lists active groups, not soft-deleted ones, so it cannot find the group to restore.
E. Get-Team cannot find a deleted team; you must find the underlying soft-deleted Microsoft 365 Group.

References

- Microsoft. (2023). Restore a deleted Microsoft 365 group. Microsoft Learn. Retrieved from https://learn.microsoft.com/en-us/microsoft-365/admin/create-groups/restore-deleted-group. (See section "Restore a group using PowerShell").

- Microsoft. (2023). Restore-AzureADMSDeletedDirectoryObject. Microsoft Learn. Retrieved from https://learn.microsoft.com/en-us/powershell/module/azuread/restore-azureadmsdeleteddirectoryobject. (See cmdlet description and examples).

- Microsoft. (2023). Get-AzureADMSDeletedGroup. Microsoft Learn. Retrieved from https://learn.microsoft.com/en-us/powershell/module/azuread/get-azureadmsdeletedgroup. (See cmdlet description).

Scroll to Top