Wednesday 22 July 2015

PDF-documents preview automated configuration

If your farm has been bound to Office Web Application Server, then you already got nice preview functions for such office document like DOCX, XLSX and PPTX:

image

By default you do not have the same function for PDF files.

You also may find good articles about how to get this behavior for PDF. For example, here is an article about how to configure PDF preview in libraries: http://www.wictorwilen.se/sharepoint-2013-enabling-pdf-previews-in-document-libraries-with-office-web-apps-2013. And here – about preview in search results: http://www.wictorwilen.se/sharepoint-2013-enabling-pdf-previews-with-office-web-apps-2013-march-2013-update.

The last one supposes that you need to manually copy search result type in each site collection where search results are rendered (all site collections potentially).

All these configurations are quite boring and may lead to mistakes. Here is the script that does configuration automatically:

https://github.com/shurick81/Sharepoint-powershell-scripts/blob/master/configure-PDF-preview

How to get know if Managed Metadata Service Application is created for multi tenancy

If you have got a farm with already Managed Metadata Service Application created, how can you check whether or not this service application was created partitioned for site subscriptions?
According to Microsoft Technet article https://technet.microsoft.com/en-us/library/ff608097.aspx for creating new multi-tenant service application you usually use following command:
New-SPMetadataServiceApplicationProxy -Name "MetadataServiceProxy3" -ServiceApplication "MetadataServiceApp3" –PartitionMode
But what if service application is already created and you do not know is it site subscription (SPSiteSubscription) aware or not.
When you open service application administration page, there is no any distinguishing attribute you can use.
And there is no any PowerShell command to examine existing service application.
The only way I found is to look at service application properties.
image
image
The only difference I found is Content Type Hub parameter that is visible in case if service application was created without partitioning. Otherwise there is no way to specify Content Type Hub because it should be assigned for each tenant separately, using command Set-SPSiteSubscriptionMetadataConfig.
So now you know at least one approach how to get know if existing Managed Metadata Application Service supports multi tenancy or not. Would be great if you know any other ways to do that, I am looking forward to your comments!