Usage
m365 spo file version keep [options]
Description
Ensure that a specific file version will never expire.
Options
| Option |
Description |
-u, --webUrl <webUrl> |
The URL of the site where the file is located. |
--fileUrl [fileUrl] |
The server- or site-relative decoded URL. Specify either fileUrl or fileId but not both. |
-i, --fileId [fileId] |
The UniqueId (GUID) of the file. Specify either fileUrl or fileId but not both. |
--label <label> |
Label of the version. |
Examples
Mark a file version as never expiring by webUrl and fileUrl:
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 webUrl and fileId:
m365 spo file version keep --webUrl "https://contoso.sharepoint.com/sites/marketing" --fileId "12345678-90ab-cdef-1234-567890abcdef" --label "6.0"
Default properties
/
API request
POST https://contoso.sharepoint.com/sites/marketing/_api/Web/GetFileByServerRelativeUrl('/sites/marketing/Shared Documents/Accountants - Docs.docx')/versions(1536)/SetExpirationDate()
Usage
Description
Ensure that a specific file version will never expire.
Options
-u, --webUrl <webUrl>--fileUrl [fileUrl]fileUrlorfileIdbut not both.-i, --fileId [fileId]fileUrlorfileIdbut not both.--label <label>Examples
Mark a file version as never expiring by webUrl and fileUrl:
Mark a file version as never expiring by webUrl and fileId:
Default properties
/
API request