Restore-PnPRecycleBinItem

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Restore-PnPRecycleBinItem.md to change this file.

Restores the provided recycle bin item to its original location

Syntax

Restore-PnPRecycleBinItem
       -Identity <RecycleBinItemPipeBind>
       [-Force]
       [-RowLimit <Int32>]
       [-Connection <PnPConnection>]
       [<CommonParameters>]

Examples

EXAMPLE 1

Restore-PnpRecycleBinItem -Identity 72e4d749-d750-4989-b727-523d6726e442

Restores the recycle bin item with Id 72e4d749-d750-4989-b727-523d6726e442 to its original location

EXAMPLE 2

Get-PnPRecycleBinItem | ? -Property LeafName -like "*.docx" | Restore-PnpRecycleBinItem

Restores all the items in the first and second stage recycle bins to their original location of which the filename ends with the .docx extension

EXAMPLE 3

Get-PnPRecycleBinItem -RowLimit 10000 | Restore-PnPRecycleBinItem -Force

Permanently restores up to 10,000 items in the recycle bin without asking for confirmation.

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:PnPConnection
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

If provided, no confirmation will be asked to restore the recycle bin item

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

Id of the recycle bin item or the recycle bin item object itself to restore

Type:RecycleBinItemPipeBind
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-RowLimit

Limits restoration to specified number of items

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False