Prerequisites:
SharePoint Online Management Shell: https://www.microsoft.com/en-us/download/details.aspx?id=35588
PnP – PowerShell Cmdlets: https://github.com/officedev/pnp-powershell/releases
PowerShell Script:
Open SharePoint Online Management Shell and execute the following script.
- ## Connects to a SharePoint Site
- Connect-SPOnline -Url https:
-
- ## Deletes a view from a list
- Remove-SPOView -List /CustomDocLibrary -Identity "Demo View1"
-
- Remove-SPOView -List /CustomDocLibrary -Identity 17ebb7d0-d757-47a3-a49b-7bdea664dc89
-
- ##Disconnects the context
- Disconnect-SPOnline