Powershell commands for File Types in SharePoint 2010 content index
In this blog we will be seeing the powershell commands for adding, deleting and getting the file types in the content index.
// Add a new file type to the content index
$searchApplicationName = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$searchApplicationName | New-SPEnterpriseSearchCrawlExtension "ascx"
//Get the particular file extension
$searchApplicationName = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$searchApplicationName | Get-SPEnterpriseSearchCrawlExtension "ascx"
//Get the list of all file extensions
$searchApplicationName = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$searchApplicationName | Get-SPEnterpriseSearchCrawlExtension
//Delete a file name extension
$searchApplicationName = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$searchApplicationName | Get-SPEnterpriseSearchCrawlExtension "ascx"| Remove-SPEnterpriseSearchCrawlExtension