How to Recover a Deleted Office 365 Group using PowerShell?
Requirement: Recover Deleted Office 365 Group via PowerShell
Prerequisites: You need to have the “Azure AD 2.0” module installed on your machine. You can check if you have the Azure AD module installed by: Get-InstalledModule. If you have any previous versions installed, You may have to uninstall using “Uninstall-Module AzureAD” and then install the latest version using “Install-Module AzureAD” cmdlet.
How to Recover Office 365 Group using Exchange Admin Center?
Office 365 groups may get deleted accidentally. Luckily, we’ve methods available to recover deleted groups! If you’ve deleted an Office 365 group, it’s retained for 30 days. After 30 days, the group and associated content are permanently deleted and cannot be restored.
- Login to Office 365 Admin center https://admin.microsoft.com
- In the left navigation, expand “Admin Center” and then click on “Exchange”
- In the Exchange admin center, under the “Recipients” tab, click on “Groups”. The group page lists all groups and the status of the groups.
- Select deleted group that you want to restore, and you can view delete time info in the right pane.
- Click on the “Restore” icon to recover the selected Office 365 group.
How to Restore Office 365 Group using PowerShell?
To recover the deleted Office 365 group via PowerShell, follow these steps:
Step 1: Connect to Azure AD
To restore a deleted Office 365 group, Open Windows PowerShell and connect to Azure AD by typing:
Connect-AzureAD
This opens the Sign page. Use your Office 365 admin account to login to Azure AD.
Step 2: Get Deleted Group’s ID
Once logged in, You can retrieve the ID of the deleted group by:
Get-AzureADMSDeletedGroup
This retrieves all deleted groups in Office 365. Note down the ID of the group you wish to restore.
Step 3: Restore Deleted Office 365 Group:
Finally, you can recover the Office 365group by tying
Restore-AzureADMSDeletedDirectoryObject -Id "Office 365 group ID"