This blog may help you to restore multiple items from the SharePoint Recycle Bin by using PowerShell. Traditionally SharePoint has had the option to restore multiple files from the recycle bin but this will not help in all cases, because Microsoft recommends that only 200 items can be restored at a time.
SharePoint-2013-Hosting
Just consider, one user has deleted more than 20K documents accidently from SharePoint and they are trying to restore then from the recycle bin, but as per the Microsoft recommendation they can restore only 200 items at a time, so just calculate how long it will take to restore all 20K documents. I will take more than an hour to restore all deleted items.

So here we are going to restore the deleted items from the recycle bin using CSOM (Client -Side Object Model) with the help of PowerShell.

Let’s see the PowerShell Code, before that we need to download the SharePoint Online Client Components SDK from Microsoft.

First add the SharePoint Client dll’s for reference,


 

By the same method, you can filter the recycle bin items by ItemName, DeletedBy, ItemState, ItemType like below, Just replace line number 26 from the above script:

  1. $DeletedByUser = Get-Host “Enter the Deleted By user ID”
  2. $DeletedByUser = $RecycleBinItems | Where {$_.DeletedByEmail -eq $DeletedByUserAccount} | Format-Table