spo file retentionlabel remove¶
Clears the retention label from a file
Usage¶
m365 spo file retentionlabel remove [options]
Options¶
-u, --webUrl <webUrl>
- URL of the site where the retention label from a file to remove is located
--fileUrl [fileUrl]
- The server- or site-relative URL of the file of which the label should be removed. Specify either
fileUrl
orfileId
but not both. -i, --fileId [fileId]
- The UniqueId (GUID) of the file of which the label should be removed. Specify either
fileUrl
orfileId
but not both. --confirm
- Don't prompt for confirming removing the retention label from a file
-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 the retention label from a file in a given site based on the file id
m365 spo file retentionlabel remove --webUrl https://contoso.sharepoint.com/sites/project-x --fileId 0cd891ef-afce-4e55-b836-fce03286cccf
Removes the retention label from a file in a given site based on the file url
m365 spo file retentionlabel remove --webUrl https://contoso.sharepoint.com/sites/project-x --fileUrl /sites/project-x/Shared Documents/Document.docx --id 1
Response¶
The command won't return a response on success.