Removes a file extension to MIME type map from an entire web server.
Remove-IisMimeMap -FileExtension <String> [<CommonParameters>]
Remove-IisMimeMap -SiteName <String> [-VirtualPath <String>] -FileExtension <String> [<CommonParameters>]
IIS won't serve static files unless they have an entry in the MIME map. Use this function toremvoe an existing MIME map entry. If one doesn't exist, nothing happens. Not even an error.
If a specific website has the file extension in its MIME map, that site will continue to serve files with those extensions.
Beginning with Carbon 2.0.1, this function is available only if IIS is installed.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
SiteName | String | The name of the website whose MIME type to set. |
true | false | |
VirtualPath | String | The optional site path whose configuration should be returned. |
false | false | |
FileExtension | String | The file extension whose MIME map to remove. |
true | false |
Remove-IisMimeMap -FileExtension '.m4v' -MimeType 'video/x-m4v'
Removes the .m4v
file extension so that IIS will no longer serve those files.