Remove-IisMimeMap

Removes a file extension to MIME type map from an entire web server.

Syntax

Remove-IisMimeMap -FileExtension <String> [<CommonParameters>]
Remove-IisMimeMap -SiteName <String> [-VirtualPath <String>] -FileExtension <String> [<CommonParameters>]

Description

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.

Related Commands

Parameters

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

EXAMPLE 1

Remove-IisMimeMap -FileExtension '.m4v' -MimeType 'video/x-m4v'

Removes the .m4v file extension so that IIS will no longer serve those files.