Saturday, December 6, 2008

Export MIME Types from IIS

I usually don’t share “my homework” or “personal developments”, but this might actually be useful at work for some of you. It’s quite simple: the idea is to export all the MIME Types registered in IIS. Furthermore, you can generate an HTML page (with style sheet) from the exported MIME Types. Here's how:

      1 – MIMETypesVBScript.vbs: the VBScript that will get the MIME Types from IIS. Note that if you are using the script on a remote server (through remote desktop, VPN, whatever), you might need special permissions to execute it.
      2 – MIMETypes.XSL: The file that will apply the style. Feel free to develop your own.

Just save the files from Github and run the VBScript (cscript MIMETypesVBScript.vbs). Finally, use the XSL to transform the XML generated. That simple.