spo file version keep
Ensure that a specific file version will never expire
Usage
m365 spo file version keep [options]
Options
-u, --webUrl <webUrl>The URL of the site where the file is located.
--fileUrl [fileUrl]The server- or site-relative decoded URL. Specify either
fileUrlorfileIdbut not both.-i, --fileId [fileId]The UniqueId (GUID) of the file. Specify either
fileUrlorfileIdbut not both.--label <label>Label of the version.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,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.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| SharePoint | AllSites.Write |
| Resource | Permissions |
|---|---|
| SharePoint | Sites.ReadWrite.All |
Examples
Mark a file version as never expiring by file URL.
m365 spo file version keep --webUrl "https://contoso.sharepoint.com/sites/marketing" --fileUrl "/sites/marketing/Documents/report.docx" --label "6.0"
Mark a file version as never expiring by file ID.
m365 spo file version keep --webUrl "https://contoso.sharepoint.com/sites/marketing" --fileId "12345678-90ab-cdef-1234-567890abcdef" --label "6.0"
Response
The command won't return a response on success.