Skip to main content

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 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.

-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 is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Permissions

ResourcePermissions
SharePointAllSites.Write

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.