Replies: 4 comments 3 replies
-
Hi, I think this is by design. |
Beta Was this translation helpful? Give feedback.
-
But do we know this for sure? Is there another way to do this? Waiting until a site is deleted is not really a solution for us. |
Beta Was this translation helpful? Give feedback.
-
I did another test. When you go to the SharePoint Admin Center -> Active sites and there delete the site, the site is deleted immediately. You first get the following confirmation The result is that the site is placed in the "Deleted sites" section and the M365 group is placed in the "Deleted groups" blade in the Azure portal. So, the SharePoint admin center is doing different commands then the PowerShell CmdLets. Maybe the SharePoint site first disconnects the group??? Is there a CmdLet for? |
Beta Was this translation helpful? Give feedback.
-
If there is a retention policy the site would not be deleted. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Reporting an Issue or Missing Feature
I'm trying to immediately remove a SharePoint site permanently. So, a M365 group with a site that is deleted and not placed in de recycle bin or remove directly from recycle bin.
Expected behavior
Site is deleted and not placed in the recycle bin.
Actual behavior
When running
Remove-PnPTenantSite -Url $siteUrl -Force -SkipRecycleBin
I get the error messageThis site belongs to a Microsoft 365 group. To delete the site, you must delete the group.
.Steps to reproduce behavior
I also tested that when you delete the group the site is automatically deleted after around 15 minutes. But then, what is the point of the cmdlet then? I can't use it? Maybe it can be used with older sites that aren't connected to a group??? We need to delete the site immediately.
What is the version of the Cmdlet module you are running?
Latest 2.3.0
Which operating system/environment are you running PnP PowerShell on?
Complete script
This script (when it's working) will be placed in an Azure Function with certificate authentication.
Beta Was this translation helpful? Give feedback.
All reactions