Requirement: Reset SharePoint view filters.
Solution: To reset SharePoint view in bulk, we can use this PowerShell script.
PowerShell script to reset SharePoint view.
Solution: To reset SharePoint view in bulk, we can use this PowerShell script.
PowerShell script to reset SharePoint view.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinueThis script removes Sorting and Filters applied to the given SharePoint list view.
$WebURL = "http://sales.crescent.com"
$ListName = "Proposal Documents"
$ViewName = "All Proposals"
#Get the Site, List and View objects
$web = Get-SPWeb $WebURL
$List = $Web.Lists[$ListName]
$View = $List.Views | ? {$_.title -eq $ViewName}
#Reset SharePoint View - By default sort by Name
$View.Query = "<OrderBy><FieldRef Name='FileLeafRef' /></OrderBy>"
$View.Update()
$List.Update()