spo site recyclebinitem list
Lists items from recycle bin
Usage
m365 spo site recyclebinitem list [options]
Options
-u, --siteUrl <siteUrl>
URL of the site for which to retrieve the recycle bin items
--type [type]
Type of items which should be retrieved. Valid values:
listItems
,folders
,files
.--secondary
Use this switch to retrieve items from secondary recycle bin
-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.
Remarks
When type is not specified then the command will return all items in the recycle bin
Examples
Lists all files, items and folders from recycle bin for site https://contoso.sharepoint.com/site
m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site
Lists only files from recycle bin for site https://contoso.sharepoint.com/site
m365 spo site recyclebinitem list --siteUrl https://contoso.sharepoint.com/site --type files
Response
- JSON
- Text
- CSV
- Markdown
[
{
"AuthorEmail": "john@contoso.onmicrosoft.com",
"AuthorName": "John",
"DeletedByEmail": "john@contoso.onmicrosoft.com",
"DeletedByName": "John",
"DeletedDate": "2023-04-20T20:02:08Z",
"DeletedDateLocalFormatted": "4/20/2023 1:02 PM",
"DirName": "Lists/Sales",
"DirNamePath": {
"DecodedUrl": "Lists/Sales"
},
"Id": "7709661a-2923-44d1-8200-5e0e4a625ce7",
"ItemState": 1,
"ItemType": 3,
"LeafName": "2_.000",
"LeafNamePath": {
"DecodedUrl": "2_.000"
},
"Size": "196",
"Title": "Test"
}
]
Id Title DirName
------------------------------------ ------------------------------------------ ---------------------
7709661a-2923-44d1-8200-5e0e4a625ce7 Test Lists/Sales
AuthorEmail,AuthorName,DeletedByEmail,DeletedByName,DeletedDate,DeletedDateLocalFormatted,DirName,Id,ItemState,ItemType,LeafName,Size,Title
john@contoso.onmicrosoft.com,John,john@contoso.onmicrosoft.com,John,2023-04-20T20:02:08Z,4/20/2023 1:02 PM,Lists/Sales,7709661a-2923-44d1-8200-5e0e4a625ce7,1,3,2_.000,196,Test
# spo site recyclebinitem list --siteUrl "https://contoso.sharepoint.com/"
Date: 2023-06-21
## Test (7709661a-2923-44d1-8200-5e0e4a625ce7)
Property | Value
---------|-------
AuthorEmail | john@contoso.onmicrosoft.com
AuthorName | John
DeletedByEmail | john@contoso.onmicrosoft.com
DeletedByName | John
DeletedDate | 2023-04-20T20:02:08Z
DeletedDateLocalFormatted | 4/20/2023 1:02 PM
DirName | Lists/Sales
Id | 7709661a-2923-44d1-8200-5e0e4a625ce7
ItemState | 1
ItemType | 3
LeafName | 2\_.000
Size | 196
Title | Test