SharePoint online tenant Recycle Bin items can not be deleted by using PnP PowerShell

Tom W 0 Reputation points
2024-04-05T07:39:23.1366667+00:00

Hi SharePoint gurus

When I connect to central admin https://xxx.sharepoint.com by using PnP.PowerShell and run Get-PnPTenantRecycleBinItem I found out there are two items with the URL of https://@xxx.sharepoint.com/sites/abc and https://@xxx.sharepoint/sites/edf. abc and edf are just the site's URL. xxx indicates our tenant's name. The @ was displayed infront of the tenant's name.

When I run $DeletedSiteURL ="https://@xxx.sharepoint.com/sites/abc"

$DeletedSite = Get-PnPTenantRecycleBinItem | Where {$_.URL -eq $DeletedSiteURL}. I am able to display the site's URL containing @.

I am the Global Admin and SharePoint Admin. I deleted the two sites from admin center by deleting it first to recycle bin and then permanently deleting it in the recycle bin. Now they ended up in the recycle bin with an added @ in the tenant's name

I have tried to delete the two sites by Clear-PnPTenantRecycleBinItem, or Restore-PnPTenantRecycleBinItem -Url $DeletedSiteURL with no luck.

I also tried to create a new site with the URL of https://xxx.sharepoint.com/sites/abc. I failed with the warning message URL exists.

How to delete the sites like these? Thanks in advance for your advice.

Kind regards.

TW

Microsoft 365 and Office | SharePoint | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Tom W 0 Reputation points
    2024-04-11T11:59:43.0833333+00:00

    Hi Ling

    Thanks for reply. I believed the issue @ was added in front of tenant's name during moving process was caused by a bug in the backend. Unfortunately there is no way to empty this recycle bin by either PowerShell script or manual.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.