Friday, September 30, 2011

Install PDF Filter Using PowerShell

SharePoint 2010 doesn’t support PDF files by default. You can solve this by installing Adobe PDF iFilter 9 for 64-bit platforms and following the steps described below. First, you can download PDFFilter64installer.msi: http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025
You’ll also need an icon that will be used in SharePoint 2010 for PDF files:
http://www.mossgurus.com/adnan/Documents/pdf16.gif

Next, start PowerShell and run the following command to install the MSI Package and configure SharePoint 2010:

# Install MSI
PS > $iFilter =C:\Media\IFilter\PDFFilter64installer.msi”
PS > Start-Process -FilePath $IFIlter -ArgumentList "/quiet"Wait
# Copy Icon to SharePoint Folder
PS > $icon =C:\Media\IFilter\pdf16.gif”
PS > Copy-Item -Path $Icon -Destination "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES"
# Modify DocIcon.xml
PS > $path = "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\DOCICON.XML"
PS > $xml = New-Object XML
PS > $xml.Load($path)
PS > $element = $xml.CreateElement("Mapping")
PS > $element.SetAttribute("Key","pdf")
PS > $element.SetAttribute("Value","pdf16.gif")
PS > $xml.DocIcons.ByExtension.AppendChild($element) | Out-Null
PS > $xml.Save($path)
# Add PDF type to Search Service Application
PS > New-SPEnterpriseSearchCrawlExtension -Name "pdf" `
>> -SearchApplication SearchServiceApp
# Modify Registry
PS > mkdir 'HKLM:\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf'
PS > Get-Item 'HKLM:\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf' | >> Set-ItemProperty -Name "(default)" `
>> -Value "{E8978DA6-047F-4E3D-9C78-CDBE46041603}"
# Restart Search Service
Get-Service | Where-Object { $_.Name -eq "OSearch14" } |
>> Restart-Service

1 comment:

  1. windows 10 product key sale , office project 2013 keys , sql server 2008 r2 enterprise key , windows 10 get serial key , windows 10 activation of app failed , enterprise windows 7 activation key , windows 10 serial key not working , windows 10 serial keys , suYDGa

    windows 10 pro key

    office 2013 pro key sale

    cheap visual studio key buy

    ReplyDelete

Posting is provided "AS IS" with no warranties, and confers no rights.