Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 1.56 KB

GetPnPRecycleBinItem.md

File metadata and controls

58 lines (45 loc) · 1.56 KB

Get-PnPRecycleBinItem

Returns the items in the recycle bin from the context

Syntax

Get-PnPRecycleBinItem [-Identity <GuidPipeBind>]
Get-PnPRecycleBinItem [-FirstStage [<SwitchParameter>]]
Get-PnPRecycleBinItem [-SecondStage [<SwitchParameter>]]
Get-PnPRecycleBinItem [-Includes <String[]>]

Returns

Microsoft.SharePoint.Client.RecycleBinItem

Parameters

Parameter Type Required Description
FirstStage SwitchParameter False Return all items in the first stage recycle bin
Identity GuidPipeBind False Returns a recycle bin item with a specific identity
Includes String[] False Specify properties to include when retrieving objects from the server.
SecondStage SwitchParameter False Return all items in the second stage recycle bin

Examples

Example 1

PS:> Get-PnPRecycleBinItem

Returns all items in both the first and the second stage recycle bins in the current site collection

Example 2

PS:> Get-PnPRecycleBinItem -Identity f3ef6195-9400-4121-9d1c-c997fb5b86c2

Returns all a specific recycle bin item by id

Example 3

PS:> Get-PnPRecycleBinItem -FirstStage

Returns all items in only the first stage recycle bin in the current site collection

Example 4

PS:> Get-PnPRecycleBinItem -SecondStage

Returns all items in only the second stage recycle bin in the current site collection