Forum Discussion

Shaun Hardneck's avatar
Shaun Hardneck
Copper Contributor
Aug 28, 2017

How to Restore Deleted Office 365 Groups

How to restore deleted Office 365 Groups

 

By default deleted Microsoft Office 365 groups are retained for 30 days. The groups which was deleted within 30 days are known as "soft-delete", and can be restored using powershell.

Powershell can also be used to permanently delete these groups if an admin does not want to wait for the "soft-delete" retention period to expire.

 

IMPORTANT: If you use Remove-MsolGroup in PowerShell to delete a group, this will delete the group permanently. When using PowerShell to delete groups, it's best practice to use Remove-AzureADMSGroup to soft-delete the O365 group. That way you can get it back if needed.

 

IMPORTANT: The procedures in this article require the PREVIEW version Azure Active Directory Module for Windows PowerShell, specifically, the AzureADPreview module, version 2.0.0.137 or later.

 

As a best practice, Microsoft recommends to always staying current: uninstall the old AzureADPreview version and get the latest one before you run PowerShell commands.

 

To get started we need to download the latest version of AzureADPreview, this can be done using a normal powershell session.

 

To save the installer file run the below cmdlet.

 

Save-Module -Name AzureADPreview -Path c:\softlib\azure

 

 

Next lets continue with installing the latest AzureADPreview PowerShell Module.

 

 Install-Module -Name AzureADPreview

 

If you have a previous version of the AzureADPreview installed use the below steps to uninstall and install the latest version.

 

Full post is posted here: http://thatlazyadmin.com/2017/08/28/restore-deleted-office-365-groups/

 

#ThatLazyAdmin

 

 

 

 

 


  • IMPORTANT: If you use Remove-MsolGroup in PowerShell to delete a group, this will delete the group permanently. When using PowerShell to delete groups, it's best practice to use Remove-AzureADMSGroup to soft-delete the O365 group. That way you can get it back if needed.

     


    Absolutely disagree. If you use PowerShell to delete Office 365 Groups, use the Remove-UnifiedGroup cmdlet. https://technet.microsoft.com/en-us/library/mt238270%28v=exchg.160%29.aspx?f=255&MSPPError=-2147217396  Remove-UnifiedGroup is purposely designed to deal with Office 365 Groups. Remove-AzureADMSGroup is a more general-purpose cmdlet to remove Azure AD Groups. It will work, but I think it is better practice to use the tool designed for the job...

     

    TR

     

     

Resources