Skip to main content

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, or listUrl.

--listTitle [listTitle]

Title of the list from which the view should be removed. Specify either listId, listTitle, or listUrl.

--listUrl [listUrl]

Server- or site-relative URL of the list. Specify either listId , listTitle or listUrl.

--id [id]

ID of the view to remove. Specify either id or title but not both

--title [title]

Title of the view to remove. Specify either id or title but not both

-f, --force

Don'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, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs 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.

CTRL + M