Add PDF mimetype for all Web Applications oneliner

By default, PDF files cannot be opened directly from SharePoint 2010/SharePoint 2013.

To add the PDF mimetype to all Web Applications (Instead of doing it seperately for each Web Application), you can use the following oneliner:

Get-SPWebApplication | %{$_.AllowedInlineDownloadedMimeTypes.Add("application/pdf");$_.Update()}

8 thoughts on “Add PDF mimetype for all Web Applications oneliner

  1. Hi Ron,

    Yes that script will work great aswell. Mine is just to add the pdf mimetype for all Web Applications. The script you pointed out gives you multiple options to add additional mimetypes to specific Web Applications

Leave a Reply

Your email address will not be published. Required fields are marked *