Usage
m365 spo file retentionlabel ensure [options]
Description
Apply a retention label to a file
Options
| Option |
Description |
-u, --webUrl <webUrl> |
The url of the web |
--fileUrl [fileUrl] |
The server-relative URL of the file that should be labelled. Specify either fileUrl or fileId but not both. |
i, --fileId [fileId] |
The UniqueId (GUID) of the file that should be labelled. Specify either fileUrl or fileId but not both. |
--name <name> |
Name of the retention label to apply to the file. |
Examples
Apply the label some label to a file
m365 spo file retentionlabel set --webUrl 'https://contoso.sharepoint.com/sites/sales' --fileUrl '/sites/sales/somelibrary/somefile.pdf' --name 'Some retention label'
More information
This command can be implemented with shared code created for #4158.
Usage
m365 spo file retentionlabel ensure [options]
Description
Apply a retention label to a file
Options
-u, --webUrl <webUrl>--fileUrl [fileUrl]fileUrlorfileIdbut not both.i, --fileId [fileId]fileUrlorfileIdbut not both.--name <name>Examples
Apply the label some label to a file
More information