Disable SharePoint Office web apps when to open documents by default

As you know SharePoint Server 2010 has a cool new Office Web Applications allowing you to open selected office documents in a browser. There are few limitations on which document you can open and which ones you can`t. One of the documents that can not be opened IRM controlled document.

If that`s the case in your organization – you probably would want to designate a special library which will hold all of such documents. SharePoint allows you to control whether office web applications will open documents by default when the item is clicked in the library. This setting can be controlled per library.

Here is a quick PowerShell script to disable default open in web apps for all of the libraries in all webs that have IRM enabled:

$webAppsFeatureId = $(Get-SPFeature -limit all | where {$_.displayname  -eq Id
Get-SPSite –limit ALL |foreach{ 
 Enable-SPFeature $webAppsFeatureId –url $_.URL }
Get-SPWeb -site  | % {$_.Lists} | where 
 {$_.IrmEnabled -eq $true} | % {$_.DefaultItemOpen = 
 [Microsoft.DefaultItemOpen]::PreferClient; $_.Update()}

Good Luck!

About the author: Yaroslav Pentsarskyy