Forum Discussion

colonel_claypoo's avatar
colonel_claypoo
Iron Contributor
Dec 15, 2017
Solved

What's the recommended way to completely remove a modern teamsite?

Hello,   I'd like to get your point of view on the "correct" way on how to remove a modern teamsite.   The reason I'm asking is because once I remove an Office 365 group, either via O365 admi...
  • Deleted's avatar
    Deleted
    Dec 19, 2017
    This is what I have in my notes that I use:

    Sometimes you may want to permanently purge a group without waiting the 30 days for the soft-delete to expire. To do that start PowerShell and run this command to get the object ID of the group
    Get-AzureADMSDeletedGroup
    Take note of the object ID of the group, or groups, you want to permanently delete.
    CAUTION: Purging the group removes the group and its data forever. 
    To purge the group run this command in PowerShell
    Remove-AzureADMSDeletedDirectoryObject –Id <objectId>
    To confirm that the group has been successfully purged, run the Get-AzureADMSDeletedGroup cmdlet again to confirm that the group no longer appears on the list of soft-deleted groups. In some cases it may take as long as 24 hours for the group and all of its data to be permanently deleted.

    From <https://support.office.com/en-us/article/Restore-a-deleted-Office-365-Group-b7c66b59-657a-4e1a-8aa0-8163b1f4eb54?ui=en-US&rs=en-US&ad=US&fromAR=1>

Resources