SharePoint Online SPOMod: Remove-SPOListView
This article describes a function of a custom SharePoint Online module available for download and installation at GitHub.
This cmdlet supports Pipeline.
Remove-SPOListView
Deletes a list view.
Parameters
ListName | Mandatory | Mutually exclusive with ListGUID. Name of the list where the view is. |
ListGUID | Mandatory | Mutually exclusive with ListName. GUID of the list where the view is. |
ViewGUID | Mandatory | Mutually exclusive with ViewName. GUID of the view to be deleted. |
ViewName | Mandatory | Mutually exclusive with ViewGUID. Name of the view to be deleted. |
Examples
----- EXAMPLE 1 ------
Remove a list view using GUID.
Remove-SPOListView -ListGUID 95D9A2CF-07C7-4128-BAEB-2367AA7C78D2 -ViewGUID 1DD28B05-C38A-4357-A873-74DA1D6F76FC
----- EXAMPLE 2 ------
Remove a list view using names.
Remove-SPOListView -ListName MyList1 -ViewName FiveThousandVie
----- EXAMPLE 3 ------
Get and remove all list views (Warning: it will end up in list being not accessible via UI and throwing 404 error)
Get-SPOListView -ListName MyList6 -IncludeAllProperties | Remove-SPOListView
See Also
SPOMod Cmdlets and Resources
Connect-SPOCSOM
Get-SPOListView