Set-IisMimeMap

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

Syntax

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

Description

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.

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

EXAMPLE 1

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

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