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?
Click on the arrows to vote for the correct answer
A. B. C. D. E.A.
http://www.mytechnetblog.com/2020/01/recover-deleted-teams.htmlThe correct answer is E. Get-Team and Restore-AzureADMSDeletedDirectoryObject.
Explanation:
In Microsoft Teams, a team is a group of people, conversations, files, and tools, all in one place. Deleting a team accidentally can be a major setback, but fortunately, it's possible to restore a deleted team using PowerShell cmdlets.
To restore a deleted team, the administrator should first run the Get-Team cmdlet to retrieve information about the deleted team. This cmdlet is used to get information about one or more teams, including their display names, descriptions, owners, and members.
The syntax for the Get-Team cmdlet is as follows:
cssGet-Team [-GroupId] <String> [-All] [-IncludeMembership] [-TemplateType <TeamTemplateType>] [-Owner <String>] [-User <String>] [-Filter <String>] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-InformationAction <ActionPreference>] [-Verbose] [-Debug] [-ErrorVariable <String>] [-WarningVariable <String>] [-InformationVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Once the administrator has retrieved the necessary information about the deleted team using the Get-Team cmdlet, they can restore the team using the Restore-AzureADMSDeletedDirectoryObject cmdlet.
The Restore-AzureADMSDeletedDirectoryObject cmdlet is used to restore a deleted directory object in Azure Active Directory (AD), including teams, users, groups, and contacts. The cmdlet restores the object to the same location and with the same name as it had before it was deleted.
The syntax for the Restore-AzureADMSDeletedDirectoryObject cmdlet is as follows:
cssRestore-AzureADMSDeletedDirectoryObject [-Id] <String> [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-InformationAction <ActionPreference>] [-Verbose] [-Debug] [-ErrorVariable <String>] [-WarningVariable <String>] [-InformationVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
In summary, to restore a deleted team in Microsoft Teams, an administrator should run the following cmdlets in PowerShell:
phpGet-Team -GroupId <ID of the deleted team> | Restore-AzureADMSDeletedDirectoryObject
This will restore the deleted team as quickly as possible.