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.

Monday, August 15, 2011

Plan for SQL snapshots with SharePoint 2010

One of the nice new features that SharePoint 2010 brings to the table is the ability to integrate with SQL Server’s snapshot generation and management functionality.
Using SQL Server snapshots makes it possible for administrators to conduct some previously disruptive operations with minimal user impact.
For example, site collection backups normally require that a site collection be write-locked in order to maintain consistency during the backup process.
The same backup can be taken against a SQL Server snapshot without incurring the adverse effects of a write lock, permitting users to continue working with the site collection being backed-up without being forced into read-only mode.

There’s a catch, though: SQL Server snapshot capabilities only exist in the Developer and Enterprise editions of SQL Server.  If you would like to use SQL Server snapshots with SharePoint 2010, be sure to plan on the use (and licensing) of SQL Server Enterprise in your farm.

Monday, August 8, 2011

SharePoint and SQL Server replication

For several versions now, SQL Server has included the ability to replicate content between databases. In the quest to make SharePoint highly available, you might be tempted to investigate SQL replication of SharePoint databases using this mechanism.
Unfortunately, SQL Server replication is not supported with SharePoint. If you are seeking to make your SharePoint environment highly available, look instead to other technologies such as Windows clustering and SQL Server database mirroring.
SQL Server transaction log shipping may also fit the bill for you if your requirements are more tolerant to data loss and down time.
Alternatively, there are third party products which can perform replication in SharePoint-friendly fashion.

Wednesday, August 3, 2011

Keep an eye on your content database sizes

When you're putting together a plan for Web applications and content databses in your environment, consider your expected usage patterns and how you expect your content databases to grow.
As a general rule of thumb, Microsoft recommends against growing content databases to larger than 200GB unless the content in the database meets specific non-collaborative usage criteria, such as that which is associated with single-site repositories and archives.
Databases that grow larger than the 200GB limit may cause performance degradation due to locking; they also represent a challenge from a backup and restore perspective.

Monday, July 11, 2011

Understand database mirroring requirements for disaster recovery purposes

SharePoint 2010 is mirroring aware and utilizes the FailoverPartner keyword in its database connection strings to identify a SQL Server instance that is used for mirroring purposes. Upon learning this, it might be tempting to jump right in and start mirroring SharePoint databases for redundancy. Before doing so, though, you should be aware that the following requirements apply:
  • Less than 1ms latency between principal and mirror SQL Server instances
  • 1GB/s bandwidth or greater between principal and mirror SQL Server instances
  • Principal and mirror instances must be running the same version and edition of SQL Server
  • Mirrored databases must use the Full recovery model
  • High safety with automatic failover (that is, synchronous mirroring with witness server) is recommended
Mirroring is certainly useful, but as the aforementioned list demonstrates: it shouldn’t be implemented without careful planning and infrastructure design.

Saturday, January 1, 2011

Export a list in SharePoint 2010 using PowerShell

If you want to export a list in SharePoint 2010 using PowerShell, you can
use the PowerShell cmdlet Export-SPWeb.

In this example, we export the document library “Documents” located in our
root site, including all versions and permissions.


Export-SPWeb http://youSPSite/ -path ”D:\backup\Documents.cmp”
`

-ItemUrl /Documents -IncludeVersions All -IncludeUserSecurity

Thursday, December 30, 2010

In case you want to Restrict the use of SharePoint designer in SharePoint 2010

SharePoint Designer 2010 has been significantly improved and we all use it,
however, there are still scenarios where you, as an administrator, will want to disable or restrict the use of SharePoint designer in your farm.
In SharePoint 2010, you are able to disable or restrict some of the features provided by SharePoint Designer on a Web Application basis.

Go to Central Administration -> General Application settings -> Configure SharePoint Designer settings. You can also configure these settings from the Application management in Central administration