Summary
Allow to remove an existing Content Type of the specified SharePoint site.
Usage
The cmdlet should like:
spo contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --id '0x000234567890'
Delete a Content Type by ID
spo contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --name 'My Custom Content Type'
Delete a Content Type by name
spo contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --name 'My Custom Content Type' --confirm
Delete a Content Type by name without confirmation prompt
Use cases
- If the content type is used by one or more SharePoint lists, the content type cannot be delete (return error message. This is the default behavior of SharePoint)
- The fields linked to the deleted Content Type have to stay
- If the Content Type does not exist, return an error
- If the Content Type exists and if it is not used by one or more SharePoint list, it can be delete
Options
The following options of the cmdlet have to be supported:
To Do
Additional informations
Expand for output related informations
No additional information
Summary
Allow to remove an existing Content Type of the specified SharePoint site.
Usage
The cmdlet should like:
spo contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --id '0x000234567890'Delete a Content Type by ID
spo contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --name 'My Custom Content Type'Delete a Content Type by name
spo contenttype remove --webUrl https://contoso.sharepoint.com/sites/project-x --name 'My Custom Content Type' --confirmDelete a Content Type by name without confirmation prompt
Use cases
Options
The following options of the cmdlet have to be supported:
-u, --webUrlWeb URL--namename of the content type (Specify either name or id but not both)--idid of the content type (Specify either name or id but not both)--confirm(to suppress prompt)-o, --output--verbose--debugTo Do
Additional informations
Expand for output related informations
No additional information