Control whether PDFs open in Word Web App or the default PDF reader

https://blogs.technet.microsoft.com/office_resource_kit/2013/07/31/control-whether-pdfs-open-in-word-web-app-or-the-default-pdf-reader/

Other articles to check.

The following command will fix the situation, where PDF documents will always open in the default PDF reader, but previewing won’t work anymore
Get-SPWOPIBinding –Application “WordPDF” | Remove-SPWOPIBinding -Confirm:$false

The following fixed all my problems  Your PDF documents will be opened in the default PDF reader, the preview will work and Word Web App will present the PDF documents in the “embedview”.

Get-SPWOPIBinding -Action “embedview” -Application “WordPdf”| Set-SPWOPIBinding -DefaultAction

Clear the SharePoint Configuration cache

To clear the config cache on the farm, follow these steps:

  • Stop the OWSTIMER service on ALL of the MOSS servers in the farm.
  • On the Index server, navigate to:

Server 2008/2012 location: Drive:\ProgramData\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.

  • Delete all the XML file in the directory. NOTE: ONLY THE XML FILES, NOT THE .INI FILE.
  • Open the cache.ini with Notepad and reset the number to 1. Save and close the file.
  • Start the OWSTIMER service on the Index server and wait for XML files to begin to reappear in the directory.
  • After you see XML files appearing on the Index server, repeat steps 2, 3 & 4 on each query server, waiting for XML files to appear before moving to subsequent servers.
  • After all of the query servers have all been cleared and new .xml files have been generated, proceed to the WFE and Application servers in the farm, following steps 2, 3, 4 and 5 for each remaining server.

Distributed Cache Service – Change Account

When AppFabric is installed as part of the SharePoint pre-requisites, it is configured to run under the credentials of the server farm. This is not recommended, and will eventually trigger a violation of a Health Analyzer Rule. To avoid this, you can change the account used by the Distributed Cache service. In the example below, we’re retrieving a managed account that has already been registered with our farm, called “CONTOSO\my_managed_account” with the Get-SPManagedAccount cmdlet. We then set that as the ManagedAccount property of the ProcessIdentity object of the Distributed Cache (“AppFabricCachingService”) SPService.

$farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq “AppFabricCachingService”}
$accnt = Get-SPManagedAccount -Identity domain\ManagedAccount
$cacheService.ProcessIdentity.CurrentIdentityType = “SpecificUser”
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentity.Update()
$cacheService.ProcessIdentity.Deploy()