spo folder set
Updates a folder
Usage
m365 spo folder set [options]
Options
-u, --webUrl <webUrl>
The URL of the site where the folder is located.
--url <url>
The server- or site-relative decoded URL of the folder.
-n, --name [name]
New name for the folder.
--color [color]
Visual color of the folder. Valid values are a color name or a number. Check remarks for more info.
-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 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
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
When you specify a value for color
, consider the following:
Color | Number value | String value |
---|---|---|
Yellow | 0 | yellow |
Dark red | 1 | darkRed |
Dark orange | 2 | darkOrange |
Dark green | 3 | darkGreen |
Dark teal | 4 | darkTeal |
Dark blue | 5 | darkBlue |
Dark purple | 6 | darkPurple |
Dark pink | 7 | darkPink |
Grey | 8 | grey |
Light red | 9 | lightRed |
Light orange | 10 | lightOrange |
Light green | 11 | lightGreen |
Light teal | 12 | lightTeal |
Light blue | 13 | lightBlue |
Light purple | 14 | lightPurple |
Light pink | 15 | lightPink |
Examples
Set the folder name to 'My Folder 2'
m365 spo folder set --webUrl https://contoso.sharepoint.com/sites/project-x --url '/Shared Documents/My Folder 1' --name 'My Folder 2'
Set the folder name to 'My folder 2'
m365 spo folder set --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/Shared Documents/My Folder 1' --name 'My Folder 2'
Set the folder color to dark blue
m365 spo folder set --webUrl https://contoso.sharepoint.com --url '/ProjectFiles/Project-x' --color 5
Set the folder color to light teal
m365 spo folder set --webUrl https://contoso.sharepoint.com --url '/ProjectFiles/Project-x' --color lightTeal
Response
The command won't return a response on success.