Skip to content

New command: spo site recyclebinitem move #4725

@milanholemans

Description

@milanholemans

Usage

m365 spo site recyclebinitem move [options]

Description

Moves items from the first-stage recycle bin to the second-stage recycle bin

Options

Option Description
-u, --siteUrl <siteUrl> URL of the site where the recycle bin is located.
-i, --ids [ids] Comma separated list of item IDs. Specify either ids or all but not both.
--all Move all first-stage recycle bin items to the second-stage recycle bin. Specify either ids or all but not both.
--confirm Don't prompt for confirmation.

Examples

Move 2 specific items from the first-stage recycle bin to the second-stage

m365 spo site recyclebinitem move --siteUrl https://contoso.sharepoint.com/sites/sales --ids "06ca4fe4-3048-4b76-bd41-296fed4c9881,d679c17b-d7b8-429a-9307-34e1d9e631e7"

Move all first-stage recycle bin items to the second-stage

m365 spo site recyclebinitem move --siteUrl https://contoso.sharepoint.com/sites/sales --all

Default properties

No response

Additional Info

API requests

Move specific item to 2nd stage:

POST https://tenant.sharepoint.com/sites/project-x/_api/web/recycleBin('<list item GUID>')/MoveToSecondStage

Move all items to 2nd stage:

POST https://tenant.sharepoint.com/sites/project-x/_api/web/recycleBin/MoveAllToSecondStage

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions