Creates or sets a file extension to MIME type map for an entire web server.


Set-IisMimeMap -FileExtension <String> -MimeType <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Set-IisMimeMap -SiteName <String> [-VirtualPath <String>] -FileExtension <String> -MimeType <String> [-WhatIf] [-Confirm] [<CommonParameters>]


IIS won't serve static files unless they have an entry in the MIME map. Use this function to create/update a MIME map entry.

Beginning with Carbon 2.0.1, this function is available only if IIS is installed.

Related Commands


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 to set.

true false
MimeType String

The MIME type to serve the files as.

true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.


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

Adds a MIME map so that IIS will serve .m4v files as video/x-m4v.