spo list contenttype add¶
Adds content type to list
Usage¶
m365 spo list contenttype add [options]
Options¶
-u, --webUrl <webUrl>
- URL of the site where the list is located
-l, --listId [listId]
- ID of the list to which to add the content type. Specify
listId
orlistTitle
but not both -t, --listTitle [listTitle]
- Title of the list to which to add the content type. Specify
listId
orlistTitle
but not both -c, --contentTypeId <contentTypeId>
- ID of the content type to add to the list
-h, --help
- output usage information
--query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text
. Defaulttext
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Examples¶
Add existing content type with ID 0x0120 to the list with ID 0cd891ef-afce-4e55-b836-fce03286cccf located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list contenttype add --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --contentTypeId 0x0120
Add existing content type with ID 0x0120 to the list with title Documents located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list contenttype add --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --contentTypeId 0x0120