Get-PnPRecycleBinItem

Returns the items in the recycle bin from the context

Syntax

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

Examples

------------------EXAMPLE 1------------------

Get-PnPRecycleBinItem

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

------------------EXAMPLE 2------------------

Get-PnPRecycleBinItem -Identity f3ef6195-9400-4121-9d1c-c997fb5b86c2

Returns all a specific recycle bin item by id

------------------EXAMPLE 3------------------

Get-PnPRecycleBinItem -FirstStage

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

------------------EXAMPLE 4------------------

Get-PnPRecycleBinItem -SecondStage

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

Parameters

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-FirstStage

Return all items in the first stage recycle bin

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Identity

Returns a recycle bin item with a specific identity

Type:GuidPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Includes

Specify properties to include when retrieving objects from the server.

Type:String[]
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-SecondStage

Return all items in the second stage recycle bin

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.SharePoint.Client.RecycleBinItem