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?
1 Answer
$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.
-
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?– GokulCommented Jul 13, 2015 at 11:18
-
1The 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. Commented Jul 13, 2015 at 11:25
-
1So 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/… Commented Jul 13, 2015 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 ?– GokulCommented Jul 13, 2015 at 14:44
-
I saw your question and have not seen this before, hopefully you had the answer in the other thread. Commented Jul 14, 2015 at 6:27