powershell
powershell copied to clipboard
[BUG] Restore-PnPRecycleBinItem Broken
Reporting an Issue or Missing Feature
Expected behavior
Every Time i use the Option -Identity with Restore-PnPRecycleBinItem. No difference is it one Item or Multi Items.
Actual behavior
Please describe what you see instead. Please provide samples of output or screenshots.
Restore-PnPRecycleBinItem -Identity "789303ac-81bb-4f21-95cf-ea297c912f33" -Force -RowLimit 1 Getting "The attempted operation is prohibited because it exceeds the list view threshold"
Every Time i use the Option -Identity. Withe on Itme-Id or Papping or so on.
Steps to reproduce behavior
Restore-PnPRecycleBinItem -Identity "789303ac-81bb-4f21-95cf-ea297c912f33" -Force -RowLimit 1
What is the version of the Cmdlet module you are running?
Manifest 2.2.0 PnP.PowerShell Desk
Which operating system/environment are you running PnP PowerShell on?
- [x] Windows
- [ ] Linux
- [ ] MacOS
- [ ] Azure Cloud Shell
- [ ] Azure Functions
- [ ] Other : please specify
We are facing the same error here. RecycleBin has more than 200K items
Yeh, i have a Small Solutions for that. It is not the fasted option, but is running.
I have used the RestAPI
$restore = Get-PnPRecycleBinItem -RowLimit 5000 | where {$_.DeletedByEmail -eq "[email protected]"} $restore.count $restore[0] $restore[0].id foreach ($item in $restore.id){Invoke-PnPSPRestMethod -Method Post -Url "/_api/site/recyclebin/restorebyids" -Content @{ids=@($item)}}
But, after ~1 Million Calls ,Microsoft has Blockend the Sharepoint Site to access for 12 houers . XD I musst Call them that wars not a DDOS or so. That wars all be me, becaus no ather working way .....
Yeh, i have a Small Solutions for that. It is not the fasted option, but is running.
I have used the RestAPI
$restore = Get-PnPRecycleBinItem -RowLimit 5000 | where {$_.DeletedByEmail -eq "[email protected]"} $restore.count $restore[0] $restore[0].id foreach ($item in $restore.id){Invoke-PnPSPRestMethod -Method Post -Url "/_api/site/recyclebin/restorebyids" -Content @{ids=@($item)}}
But, after ~1 Million Calls ,Microsoft has Blockend the Sharepoint Site to access for 12 houers . XD I musst Call them that wars not a DDOS or so. That wars all be me, becaus no ather working way .....
@VonHohenheim93 , Exactly what I was considering doing as a workaround until they fix the bug. Since we have millions of files to restore due to accidental deletion, we'll need to do it in small batches or send them via a batch request.