Usage
m365 spo file archive [options]
Description
Archives a file
Options
| Option |
Description |
-u, --webUrl <webUrl> |
The URL of the site where the file is located. |
--url [url] |
The server- or site-relative decoded URL of the file to archive. Specify either url or id, but not both. |
-i, --id [id] |
The UniqueId (GUID) of the file to archive. Specify either url or id, but not both. |
-f, --force |
Do not prompt for confirmation. |
Examples
Archive a file without prompting for confirmation
m365 spo file archive --webUrl https://contoso.sharepoint.com/sites/Marketing --id 7a8c9207-7745-4cda-b0e2-be2618ee3030 --force
Archive a file by URL with prompting for confirmation
m365 spo file archive --webUrl https://contoso.sharepoint.com/sites/Marketing --url /sites/Marketing/shared%20documents/document.docx
Default properties
No response
Additional Info
POST https://contoso.sharepoint.com/_api/Lists(guid'${listId}')/items(${itemId})/Archive`
Usage
m365 spo file archive [options]
Description
Archives a file
Options
-u, --webUrl <webUrl>--url [url]urlorid, but not both.-i, --id [id]urlorid, but not both.-f, --forceExamples
Archive a file without prompting for confirmation
Archive a file by URL with prompting for confirmation
Default properties
No response
Additional Info