How to Activate MIME Type using Powershell

$mime = “text/html”
$webAppUrl = “http://test.company.com”
$webApp = Get-SPWebApplication $webAppUrl

If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains $mime)
{
Write-Host -ForegroundColor White “Adding MIME Type “$mime
#$webApp.AllowedInlineDownloadedMimeTypes.Add($mime)
#$webApp.Update()
Write-Host -ForegroundColor Green “MIME Type added and saved.”
}
Else
{
Write-Host -ForegroundColor Yellow $mime” MIME type is already added.”

}

NGenious Solutions