3

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.

3
  • 1
    yep, not possible via CSOM/PowerShell. They have not exposed this method, only works for SP Onprem's Server object model :( Commented Mar 6, 2019 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. Commented Mar 6, 2019 at 11:25
  • 1
    @GautamSheth you should post it as answer. Commented Mar 6, 2019 at 11:42

1 Answer 1

2

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.