spo file version remove¶
Removes a specific version of a specified file
Usage¶
m365 spo file version remove [options]
Options¶
-w, --webUrl <webUrl>
- The URL of the site where the file is located
--label <label>
- Label of version which will be removed
-u, --fileUrl [fileUrl]
- The server-relative URL of the file to retrieve. Specify either
fileUrl
orfileId
but not both -i, --fileId [fileId]
- The UniqueId (GUID) of the file to retrieve. Specify either
fileUrl
orfileId
but not both --confirm [confirm]
- Don'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
,response
,full
. Default isfull
. --query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv,md
. Defaultjson
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Examples¶
Removes a file version in a specific site based on fileId and prompts for confirmation
m365 spo file version remove --webUrl https://contoso.sharepoint.com --label "1.0" --fileId 'b2307a39-e878-458b-bc90-03bc578531d6'
Removes a file version in a specific site based on fileUrl and prompts for confirmation
m365 spo file version remove --webUrl https://contoso.sharepoint.com --label "1.0" --fileUrl '/Shared Documents/Document.docx'
Removes a file version in a specific site based on fileId without prompting for confirmation
m365 spo file version remove --webUrl https://contoso.sharepoint.com --label "1.0" --fileId 'b2307a39-e878-458b-bc90-03bc578531d6' --confirm
Removes a file version in a specific site based on fileUrl without prompting for confirmation
m365 spo file version remove --webUrl https://contoso.sharepoint.com --label "1.0" --fileUrl '/Shared Documents/Document.docx' --confirm
Response¶
The command won't return a response on success.