spo site recyclebinitem restore
Restores given items from the site recycle bin
Usage
m365 spo site recyclebinitem restore [options]
Options
-u, --siteUrl <siteUrl>
URL of the site.
-i, --ids [ids]
List of ids of items which will be restored from the site recycle bin. Specify
ids
orallPrimary
and/orallSecondary
.--allPrimary
Restore all items from the first-stage recycle bin. Specify
ids
orallPrimary
and/orallSecondary
.--allSecondary
Restore all items from the second-stage recycle bin. Specify
ids
orallPrimary
and/orallSecondary
.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Examples
Restore specific items by given ids from recycle bin of given site.
m365 spo site recyclebinitem restore --siteUrl https://contoso.sharepoint.com/sites/project --ids "ae6f97a7-280e-48d6-b481-0ea986c323da,aadbf916-1f71-42ee-abf2-8ee4802ae291"
Restore all items from the first-stage recycle bin of a given site.
m365 spo site recyclebinitem restore --siteUrl https://contoso.sharepoint.com/sites/project --allPrimary
Restore all items from the second-stage recycle bin of a given site.
m365 spo site recyclebinitem restore --siteUrl https://contoso.sharepoint.com --allSecondary
Restore all items from both the first-stage and second-stage recycle bins of a given site.
m365 spo site recyclebinitem restore --siteUrl https://contoso.sharepoint.com --allPrimary --allSecondary
Response
The command won't return a response on success.