Share via

Error when using Remove-SPOSite command on PowerShell

Anonymous
2021-08-25T16:51:18+00:00

Hi,

I'm working with Sharepoint Online, since past year I was creating Sharepoint sites from a personal powershell script, using PnP and Sharepoint modules.

It was working fine but since last week I'm getting this error:

Remove-SPOSite : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

I tried it with differents accounts (all Global administrators), on differents sites and in differents tenants, but the error keeps there.

Could have it been an update on Sharepoint Online? Is there someone else with the same problem?

How can I solve this?

PD: I need to use this command, cause I create sites from a template, so then I have to change the url and reuse the original when I run the script again

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

3 answers

Sort by: Most helpful
  1. Anonymous
    2021-08-27T01:09:11+00:00

    Hi Leonardo GarciaCT,

    Sorry, because we do not support Powershell,we recommended to ask the question  in the Microsoft Q&A supported products | Microsoft Docs for a better help. Since your issue is relate to PowerShell. It is better suited to post in that community. And it has more experts in this area to help you.

    Thank you for your understanding.

    Tin

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2021-08-26T20:58:11+00:00

    Thanks for your reply Tin,

    But sorry, I didn't understand. What permissions should I check?

    If I tried it always with Gobal Administrators accounts, and with powershell running as admin, with powershell ISE and with the Sharepoint online management ps console.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-08-26T01:28:28+00:00

    Hi Leonardo GarciaCT,

    Thank you for posting in this Answer Community. 

    It seems that your issue is related to PowerShell. We found a similar post for your reference:Solved: SharePoint update item fail: Access is denied. (Ex... - Power Platform Community (microsoft.com)

     

    However, to avoid sharing any incorrect information from our side, it’s also recommended to ask the question  in the Microsoft Q&A supported products | Microsoft Docs for a better help. Since your issue is relate to PowerShell. It is better suited to post in that community. And it has more experts in this area to help you.

    Thank you for your understanding.

    If I have any misunderstands, welcome to contact me. And I will further investigate it.

    Best Regards,

    Tin

    Was this answer helpful?

    0 comments No comments