spo list view remove
Deletes the specified view from the list
Usage
m365 spo list view remove [options]
Options
-u, --webUrl <webUrl>URL of the site where the list to remove the view from is located
--listId [listId]ID of the list from which the view should be removed. Specify either
listId,listTitle, orlistUrl.--listTitle [listTitle]Title of the list from which the view should be removed. Specify either
listId,listTitle, orlistUrl.--listUrl [listUrl]Server- or site-relative URL of the list. Specify either
listId,listTitleorlistUrl.--id [id]ID of the view to remove. Specify either
idortitlebut not both--title [title]Title of the view to remove. Specify either
idortitlebut not both-f, --forceDon't prompt for confirming removing the view
-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
Remove view from the list by ID 0cd891ef-afce-4e55-b836-fce03286cccf located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --id cc27a922-8224-4296-90a5-ebbc54da2e81
Remove view with ID cc27a922-8224-4296-90a5-ebbc54da2e81 from the list with title Documents located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --id cc27a922-8224-4296-90a5-ebbc54da2e81
Remove view with title MyView from a list with title Documents located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --title MyView
Remove view with title MyView from a list with url /sites/project-x/lists/Events located in site https://contoso.sharepoint.com/sites/project-x
m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/sites/project-x/lists/Events' --title MyView
Remove view with ID cc27a922-8224-4296-90a5-ebbc54da2e81 from a list with title Documents located in site https://contoso.sharepoint.com/sites/project-x without being asked for confirmation
m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle Documents --id cc27a922-8224-4296-90a5-ebbc54da2e81 --force
Response
The command won't return a response on success.