I want to be able to replicate this adsutil.vbs behaviour in powershell:
cscript adsutil.vbs set W3SVC/$(ProjectWebSiteIdentifier)/MimeMap ".pdf,application/pdf"
and I've gotten as far as getting the website object:
$website = gwmi -namespace "root\MicrosoftIISv2" -class "IISWebServerSetting" -filter "ServerComment like '%$name%'"
if (!($website -eq $NULL)) {
#add some mimetype
}
and listing out the MimeMap collection:
([adsi]"IIS://localhost/MimeMap").MimeMap
Anyone know how to fill in the blanks so that I can add mimetypes to an exiting IIS6 website?