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

Tuesday, September 27, 2011

KPI Values in SharePoint 2010

Previous versions of SharePoint had limitations to folders support for the KPI Lists. Whenever you tried to set Folder as a source of your KPI, SharePoint gave you an error that the folder can't be selected. To avoid such situation you had to maintain KPI values in different list or use Views.
The issue with Views is that they don't allow you to assign the permissions per View, so you can't have groups of data and assign different permission for KPI values based on views.
The only solution for SharePoint 2007 was usage of separate Lists. SharePoint 2010 fixed this issue, and now you can organize your values per folders in one List for KPI’s.

Sunday, September 25, 2011

PowerShell commands for SharePoint 2010

PowerShell commands for SharePoint 2010 To find the PowerShell commands n SharePoint 2010, try these:
>Get-Command -Noun SPSite
You can get the all PowerShell commands:
>Get-Help Get-SPSite
You can get the Name, Syntax, Description, Related Links, Remarks
To Retrieve content database for a specific site collection:
>Get-SPContentDatabase -Site http://SPServer01
Results:
ID:96dfa345-43df-3edg-bbc6-1l4e8ee105le
Name:WSS_content
Web Application:SPWeb Application Name=Sharepoint - 80
Server:SPServer01
CurrentSiteCount
:2

To retrieve the content database for a specific Web Application:
>Get-SPContentDatabase -WebApplication "Sharepoint - 80"
Results:
ID:96dfa345-43df-3edg-bbc6-1l4e8ee105le
Name:WSS_content
Web Application:SPWeb Application Name=Sharepoint - 80
Server:SPServer01
CurrentSiteCount
:2
I hope this tip helps someone else save time and frustration as it did for me.