How to export a sharepoint recycle bin to excel file, please let me know in step by step

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/284485

  •  15-02-2021
  •  | 
  •  

Вопрос

I'm trying to search a specific file from a sharepoint recycle bin but I'm unable to find it. Can anyone please help me in that

Это было полезно?

Решение

You can use PnP PowerShell to get the report for Recycle Bin.

Here is a sample script for your reference:

#Get the PnP PowerShell module
##Skip this line if you already have it
Install-Module SharePointPnPPowerShellOnline

#Config Variables
$SiteURL = "<SiteURL>"
$Username = "<GlobalAdminAccount>"
$Password = "<Password>"
$FilePath = "C:\Temp\RecycleBin.csv"

#Connect to PnP Online
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $UserName, $(convertto-securestring $Password -asplaintext -force)
Connect-PnPOnline -Url $SiteURL -Credential $cred

#Get Recycle bin Items
Get-PnPRecycleBinItem | Select Title, ItemType, Size, ItemState, DirName, DeletedByName, DeletedDate | Export-Csv $FilePath -NoTypeInformation

References: SharePoint Online: Search Recycle Bin using PowerShell. / PnP PowerShell overview.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top