There is a commandlet for finding the deleted site collections in sharepoint ( Get-SPDeletedSite). How can i find the deleted sites under a site collection?

$site = get-spsite http://www.url.com/sites/sitecollection

$site.Recyclebin | where {$_.itemtype -eq "web"}

This get's all the sub-sites in a site collections recycle bin.

Powershell for working with SharePoint Recycle Bin

| improve this answer | |
  • Hi, Thank you!! It's working.But when I see my site collections recycle bin , I could see two views like 1.End user recycle bin items and 2. Deleted from end user recycle bin. I found my deleted site under the second view category. What does these two means? – Gokul Jul 13 '15 at 11:18
  • 1
    The user recycle bin is where the deleted item is stored by default for 60 days, so that a user can restore any items they deleted by them self. After 60 days, the object are moved to the site collection recycle bin where the item is stored for another 30 days so that a site collection administrator can restore the item if needed. It's like a extra failsafe if a user would delete anything from the 1st stage recycle bin. – Christoffer Jul 13 '15 at 11:25
  • 1
    So you need to be the site collection administrator ( or have any higher admin privilege ) to be able to reach/restore the site. support.office.com/en-nz/article/… – Christoffer Jul 13 '15 at 11:27
  • Deleted time differs from the time shown in sharepoint site collection recycle bin and the time which i get from the powershell script. Do you know why it happens ? – Gokul Jul 13 '15 at 14:44
  • I saw your question and have not seen this before, hopefully you had the answer in the other thread. – Christoffer Jul 14 '15 at 6:27

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.