Cannot delete Sharepoint site redirect in PowerShell

Anonymous
2022-06-15T08:35:47+00:00

Hello

I need to delete a sharepoint site redirect. Before I deleted the sharepoint site with PowerShell, but for unknown reason, the site redirect didn't got deleted.

The Sharepoint site has been deleted frontend in the Sharepoint admin center and backend using Remove-SPODeletedSite. Get-SPODeletedSite results with no sites, so I assume it's all been correct deleted.

When I try this in PowerShell, I got this error. So I assume it's corrupt and only the technical team can delete this.

I have global admin rights.

Thank you!

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2022-06-21T06:51:20+00:00

    Dear Pieter,

    I'm following up on the thread with you.

    The command Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/OldSiteName should remove the site redirect.

    Based on the error message "The operation is not supported for the site,"  after you run the command in PowerShell in your environment, there may be some retention policies applied to the old site. I suggest you check whether there are some retention policies. If yes, you might need to remove the retention policy to delete the redirect.

    For your reference: Manage site redirects

    Sincerely,

    Cliff | Microsoft Community Moderator

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-06-15T10:23:04+00:00

    Dear Pieter,

    Good day! Thank you for posting to Microsoft Community. We are happy to help you.

    I go through your description, you delete the site both fronted and backend, but the SharePoint site redirect remains. May I confirm what is the redirect mentioned in the thread, this will help me understand your scenario better. Also, if you could provide any other details will be great help.

    Meanwhile, it takes time to test this scenario on our side, so once after we receive your reply, we will do the test and post the results in this thread later.

    Thanks for your understanding and cooperation, look forward to receive your reply.

    Have a good day.

    Sincerely,

    Sean Cai | Microsoft Community Moderator

    ***Note: In the event that you're unable to reply to this thread, please ensure that your Email address is verified in the Community Website by clicking on Your Account Name > "My Profile" > "Edit Profile" > Add your Email Address > tick "Receive email notifications" checkbox > click on "Save".***

    0 comments No comments
  2. Anonymous
    2022-06-19T20:05:09+00:00

    Hi Sean

    Thank you for your reply.

    Correct, the Sharepoint redirect remains.

    I don't want to publish the full sharepoint siteadress on this public post for security reasons.

    Can you send me a PM?

    Thanks for the help.

    0 comments No comments
  3. Anonymous
    2022-06-20T16:37:50+00:00

    Hi Pieter,

    Thanks for your reply.

    We will contact you through PM and finish the test later.

    Thanks for your understanding and cooperation, have a good day!

    Sincerely,

    Sean Cai | Microsoft Community Moderator

    0 comments No comments