SharePoint Online SPOMod: Remove-SPOList
This article describes a function of a custom SharePoint Online module available for download and installation on GitHub where it welcomes all your suggestions and contributions.
Remove-SPOList
Removes a list.
Parameters
ListName | Mandatory | Name of the list to be removed |
Examples
----- EXAMPLE 1 ------
Remove a list.
Remove-SPOList -ListName quick5
----- EXAMPLE 2 ------
Remove a number of lists. The list names for removal can be imported from csv or specified with a condition. The example below tries to remove all the lists from a site. Fortunately SharePoint will not allow us to remove default/ system lists and throw an error for those. Our custom lists will be removed.
$titles=(get-spolist).Title
foreach($titel in $titles){Remove-SPOList -ListName $titel}
See Also
SPOMod Cmdlets and Resources
Connect-SPOCSOM
Get-SPOList
New-SPOList
Set-SPOList