spo file version clear
Removes all version history of a specified file
Usage
m365 spo file version clear [options]
Options
-u, --webUrl <webUrl>The URL of the site where the file is located.
--fileUrl [fileUrl]The server- or site-relative decoded URL of the file. Specify either
fileUrlorfileIdbut not both.-i, --fileId [fileId]The UniqueId (GUID) of the file. Specify either
fileUrlorfileIdbut not both.-f, --forceDon't prompt for confirmation.
-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.
Examples
Removes all file version history in a specific site based on fileId and prompts for confirmation.
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileId 'b2307a39-e878-458b-bc90-03bc578531d6'
Removes all file version history in a specific site based on fileUrl and prompts for confirmation.
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileUrl '/Shared Documents/Document.docx'
Removes all file version history in a specific site based on fileId without prompting for confirmation.
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileId 'b2307a39-e878-458b-bc90-03bc578531d6' --force
Removes all file version history in a specific site based on fileUrl without prompting for confirmation.
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileUrl '/Shared Documents/Document.docx' --force
Response
The command won't return a response on success.