SharePoint Document Issues

How to Restore Bulk SharePoint Recycle Bin Items Using PowerShell PagingInfo

Aamir Naveed AkramAamir Naveed Akram Oct 26, 2026 868 views

Question details

The user needs to restore hundreds of thousands of deleted SharePoint documents using PowerShell because the standard recycle bin interface cannot handle the volume.

How to Use PowerShell PagingInfo for SharePoint Recycle Bin Restoration
Product
SharePoint
Device & OS
not provided
Scenario
Attempting a bulk restoration of deleted documents from the SharePoint recycle bin using PowerShell scripting.
Observed behavior
The standard recycle bin UI is impractical for massive numbers of deleted items, requiring a script that utilizes PagingInfo to process the restoration in batches.
Before you start

Verify your SharePoint Administrator permissions and ensure you have the latest SharePoint Online Management Shell or PnP PowerShell module installed on your system.

Solution 1Recommended

Restore the SharePoint Document Library to a Previous Time

The most efficient method for recovering massive amounts of recently deleted files without writing complex, paginated PowerShell scripts.

Before diving into complex PowerShell queries with PagingInfo, check if you can simply roll back the entire document library. This feature natively handles massive changes and eliminates the need for scripting.

1
Access the Affected Library

Navigate to the specific SharePoint document library where the mass deletion occurred using your web browser.

2
Open Library Settings

Click the Settings gear icon in the top right corner of the SharePoint interface and select 'Restore this library'.

3
Select a Target Date

Choose a specific date and time from the dropdown menu that falls immediately before the mass deletion incident took place.

4
Confirm and Restore

Review the slider showing the changes that will be undone, then click 'Restore' to revert the library to its previous state.

Restore the SharePoint Document Library to a Previous Time
Time Limitation: The 'Restore this library' feature is typically only available for undoing actions that occurred within the last 30 days.
Free Microsoft Office alternative

Manage Your Local Documents Efficiently with WPS Office

While resolving complex SharePoint server issues requires administrative IT tools, managing and backing up your daily documents is much simpler with reliable desktop software. WPS Office is a lightweight, highly compatible alternative to Microsoft Office that helps you avoid data loss through powerful local auto-backup features.

  1. 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the Software: Run the downloaded installer file and follow the straightforward on-screen instructions to complete the setup.
  3. 3. Open Your Documents: Launch WPS Office and open your existing Microsoft Office files to edit them locally with full compatibility.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats to ensure seamless file sharing.Built-in document auto-backup and local version history to prevent accidental data loss.Lightweight architecture that runs smoothly on almost any PC without heavily consuming system resources.Free to download with a familiar ribbon interface, allowing you to stay productive immediately.
QA img-9

Frequently Asked Questions

Why can't I just use the SharePoint Recycle Bin interface to restore all files?

The standard SharePoint web interface is not designed to process hundreds of thousands of items simultaneously. Attempting to bulk-select and restore that volume through the browser usually results in page crashes, timeouts, or incomplete restorations.

What exactly is the PagingInfo parameter in SharePoint PowerShell?

PagingInfo is a property used by SharePoint APIs to manage massive datasets. It acts as a bookmark, telling your script where the last batch of items ended so the subsequent query can pick up exactly where it left off without overloading the server.

How long are deleted files kept in the SharePoint Recycle Bin?

By default, deleted items are retained in the SharePoint recycle bins for a total of 93 days. This duration encompasses the time spent in both the first-stage (user) and second-stage (site collection administrator) recycle bins.

Can I use 'Restore this library' for a specific folder instead of the whole library?

No, point-in-time library restoration rolls back the entire document library. If you only need to restore a specific folder's contents, you must manually recover them from the recycle bin or write a targeted PowerShell script.