Here i will be adding the choice column to the Key Filters.
$siteURL="http://serverName:1111/"
$site=Get-SPSite $siteURL
$web=$site.RootWeb
$list=$web.Lists.TryGetList("cl")
$field=$list.Fields["Country"]
$listNavSettings=[Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationSettings]::GetMetadataNavigationSettings($list)
$mdnKeyFilter=New-Object Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationKeyFilter($field)
$listNavSettings.AddConfiguredKeyFilter($mdnKeyFilter)
[Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationSettings]::SetMetadataNavigationSettings($list, $listNavSettings, $true)
Configure Key Filters in SharePoint 2010 using powershell
In this blog we will be seeing how to configure Key Filters in SharePoint 2010 using powershell


Join the conversation! Your thoughts help the community grow.