spo list contenttype default set
Sets the default content type for a list
Usage
m365 spo list contenttype default set [options]
Options
-u, --webUrl <webUrl>URL of the site where the list is located.
-l, --listId [listId]ID of the list. Specify either
listTitle,listId, orlistUrl.-t, --listTitle [listTitle]Title of the list. Specify either
listTitle,listId, orlistUrl.--listUrl [listUrl]Server- or site-relative URL of the list. Specify either
listTitle,listId, orlistUrl.-c, --contentTypeId <contentTypeId>ID of the content type
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,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.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Examples
Set a content type with a specific id as default a list retrieved by id located in a specific site.
m365 spo list contenttype default set --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --contentTypeId 0x0120
Set a content type with a specific id as default a list retrieved by title located in a specific site.
m365 spo list contenttype default set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --contentTypeId 0x0120
Set a content type with a specific id as default a list retrieved by server relative URL located in a specific site.
m365 spo list contenttype default set --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'sites/project-x/Documents' --contentTypeId 0x0120
Response
The command won't return a response on success.