Skip to content

Instantly share code, notes, and snippets.

@stack72
Created May 17, 2013 09:20
Show Gist options
  • Save stack72/5597978 to your computer and use it in GitHub Desktop.
Save stack72/5597978 to your computer and use it in GitHub Desktop.
Write-Host('Enabling Dynamic Compression in IIS')
Import-Module ServerManager
Add-WindowsFeature Web-Dyn-Compression
Write-Host("Adding dynamic compression types")
$compressions= @(
@{name ='dynamictypes'; mimeType='application/json'; enabled='True'}
#Add more here in an array declaration of its own
)
foreach ($compression in $compressions){
Add-Webconfiguration -Filter 'system.webServer/httpCompression/dynamictypes' -Value $compression
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment