Aug 9, 2011
tom

How to install the dynamic content compression component of IIS (both 6 and 7) non interactively?

Question

Any of the following goes as non interactive for me:

  • Command line silent installation
  • Script file
  • Code (.NET, C, VB, whatever)

Thanks.

EDIT

I’d like to stress, that I wish to install the module responsible for the dynamic content compression. This is different from configuring the dynamic content compression after the respective module has already been installed.

Answer

IIS7.x

http://weblogs.asp.net/owscott/archive/2009/02/22/iis-7-compression-good-bad-how-much.aspx

C:WindowsSystem32InetsrvAppcmd.exe set config -section:urlCompression -doStaticCompression:true -doDynamicCompression:true
C:WindowsSystem32InetsrvAppcmd.exe set config -section:httpCompression -[name='gzip'].staticCompressionLevel:9 -[name='gzip'].dynamicCompressionLevel:4

IIS 6

http://weblogs.asp.net/owscott/archive/2004/01/12/IIS-Compression-in-IIS6.0.aspx

cscript C:InetpubAdminScriptsadsutil.vbs set w3svc/site#/root/DoStaticCompression False
cscript C:InetpubAdminScriptsadsutil.vbs set w3svc/site#/root/DoDynamicCompression False

Related posts:

  1. IIS: Request with unknown content-type denied
  2. Enabling Details HTTP Errors for a certain network in IIS 7
  3. In IIS, Is it possible to execute a .HTML page as aspx?
  4. DOS attack “slow post” : How to prevent in IIS
  5. iis – cname – start page when using domain and content using www.domain

Leave a comment