In SharePoint Online is there a way to send a Web (a sub site) to the site collection recycle bin via PowerShell/CSOM?

I know that a web can be deleted with Web.DeleteObject() but this does a permanent delete and this is not what I need.

  • 1
    yep, not possible via CSOM/PowerShell. They have not exposed this method, only works for SP Onprem's Server object model :( – Gautam Sheth Mar 6 '19 at 11:21
  • Really? That sucks. It's such an important bit of functionality. Why they allow it via the GUI and not via CSOM is mystifying. – Submits Mar 6 '19 at 11:25
  • 1
    @GautamSheth you should post it as answer. – Marek Sarad Mar 6 '19 at 11:42

This is one of those annoying things which work in SP OnPrem and not in SP Online.

Unfortunately, we don't have capability to send the SP Web to recycle bin programmatically in SPO. The method to do that is not available right now via CSOM, PowerShell or REST APIs. It can be done via the UI though.

There is a uservoice request for this as well which you can upvote.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.