0

The recycle bin for this given site collection (Projects) contains over 14,000 items. I need to find few documents that has following metadata. How do I do that? It seems I can't add additional metadata to the recycle bin view.

Customer Name = "Proctor & Gamble" Customer Region = "NW"

0

You can try SPRecycleBinQuery in Powershell, but that won't give you the option in UI.. so I suggest, if you want to restore this item you do it from Powershell too..

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

#Get the Site collection
$site = new-object Microsoft.SharePoint.SPSite("http://sharepoint.company.com")

#Create new object for SPRecycleBinQuery
$query = new-object Microsoft.SharePoint.SPRecycleBinQuery

#$query.ItemState = "FirstStageRecycleBin"
$query.ItemState = "SecondStageRecycleBin"

#How many Rows to be returned
$query.RowLimit = 100

#Call GetRecycleBinItems to Search Inside SharePoint Recycle Bin
$DeletedItemsColl = $site.GetRecycleBinItems($query)

#Filter Result
$Result= $DeletedItemsColl | where  {$_.Title -match ".txt"}

#Write output
$Result | foreach-object {
    (Write-Host "Found Item:" $_.Title)
    (write-host "Created by:" $_.AuthorName)
    (write-host "Deleted by:" $_.DeletedByName)
    (write-host  "Deleted Date:"$_.DeletedDate)
  (write-host  "File Size(Bytes):" $_.Size)
  (write-host  "Original Location:" $_.DirName)
  (write-host "Web:" $_.web.URL)
 (Write-Host "------------------------------------")
  }

Checkout this post:

Search SharePoint Recycle bin with SPRecycleBinQuery

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.