Share via

Recycle Bin Paging in Powershell

Anonymous
2022-04-03T01:56:11+00:00

I am attempting to restore a few hundred thousand documents deleted by one of my users in a SharePoint library. The UI for the site-based tool was pretty much useless for this kind of task so I'm attempting to build out a PowerShell script.

Do any of you know what kind of syntax/values to serve to the PagingInfo property in the RecycleBinQueryInformation object?

I cannot find it documented anywhere.

Microsoft.SharePoint.Client.RecycleBinQueryInformation

https://docs.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.client.recyclebinqueryinformation?view=sharepoint-csom

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-04-03T03:26:06+00:00

    Thank you for your response. I would really appreciate an answer to the question though.

    What are the string parameters that go into the PagingInfo property?

    It's referenced in several places, but no detail is given.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-04-03T02:27:55+00:00

    Hi,

    Welcome to Microsoft Community.

    Based on the description, we do understand your demand to restore files from SharePoint Recycle Bin with running PowerShell Scripts. If so, I'd like to share the following details.

    1.If during a specific time, there has no extra actions but only a user deleted files in the Library, then I'd like to suggest using Restore Library feature in SharePoint Online. For reference: Restore a previous version of an item or file in SharePoint (microsoft.com)

    2.If it still needs PowerShell for a more automatic way, kindly check if the following references will help.

    Restore all files but ones that already exist from the recycle bin using PowerShell - Microsoft Tech Community

    Restore Deleted Items from Recycle Bin in SharePoint Using PowerShell - SharePoint Diary

    How to restore SharePoint files with PowerShell (sposcripts.com)

    ***Disclaimer:***Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites or any support related to technology.

    We are sorry to convey that engineers in this category focus on the out-of-box features in SharePoint and it is suggested to seek more detailed support about PowerShell scripts on communities like Microsoft PowerShell Community or Microsoft Tech Community. Your understanding is highly appreciated!

    Best Regards,

    Mia

    Was this answer helpful?

    0 comments No comments