This post is a result of annoying UI vs CLI differences in SharePoint 2010. The central administration indicates that you specify “file types” to include in the content index. These file types are nothing but the file extensions such as PDF, DWG, etc. You generally add these file types when you install additional iFilters for indexing your SharePoint content.
So, when I wanted to add the file types using PowerShell, I started looking around for a cmdlet to do that. However, you will keep searching the for cmdlets if you did not know that these “file types” are called crawl extensions in PowerShell. Yes, that is the annoying design I was referring to. Like I mentioned in an earlier post, it really feels like two different product teams worked on the management interfaces and they never spoke to each other..!
Now, coming to the subject of this post, you can add file types crawl extensions by using New-SPEnterpriseSearchCrawlExtension cmdlet.
<span style="color: #0000ff;">Get-SPEnterpriseSearchServiceApplication</span> <span style="color: #a9a9a9;">|</span> <span style="color: #000000;">`
</span> <span style="color: #0000ff;">New-SPEnterpriseSearchCrawlExtension</span> <span style="color: #000080;">-Name</span> <span style="color: #8a2be2;">dwg</span>
The above command will add “dwg” to the crawl extensions list. To see a list of all crawl extensions, you can use Get-SPEnterpriseSearchCrawlExtension cmdlet.