
Hi @DWTK
Microsoft 365 Groups are group objects that are available across Microsoft 365 services, you need to be assigned permissions before you can run this cmdlet.
You could delete the modern team site and associated groups as below using PnP PowerShell.
$tenantName= "companyName"
$username = "******@companyName.be"
$password = "SuperSavePassword" | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$Password
Connect-PnPOnline "https://tenant-admin.sharepoint.com" -Scopes "Group.ReadWrite.All", "Directory.ReadWrite.All" -Credentials $cred
$unifiedGroup = Get-PnPUnifiedGroup -Identity "Group Name"
Remove-PnPUnifiedGroup -Identity $unifiedGroup.ID
Disconnect-PnPOnline
Connect-PnPOnline "https://tenant-admin.sharepoint.com" -Credentials $cred
Remove-PnPTenantSite https://tenant.sharepoint.com/sites/ModernTeamSite
Disconnect-PnPOnline
For more information, you could refer to:
https://winsmarts.com/completely-delete-an-office365-site-collection-classic-or-modern-from-recycle-bin-ce04808894fa
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.