DSCResources/MSFT_xIisMimeTypeMapping/en-US/about_xIisMimeTypeMapping.help.txt
.NAME
xIisMimeTypeMapping .DESCRIPTION The xIisMimeTypeMapping DSC resource is used to... ## Requirements * Target machine must be running Windows Server 2012 R2 or later. ## Known issues All issues are not listed here, see https://github.com/dsccommunity/xWebAdministration/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+xIisMimeTypeMapping. .PARAMETER ConfigurationPath Key - String This can be either an IIS configuration path in the format computername/webroot/apphost, or the IIS module path in this format IIS:\sites\Default Web Site. .PARAMETER Extension Key - String The file extension to map such as .html or .xml. .PARAMETER MimeType Key - String The MIME type to map that extension to such as text/html. .PARAMETER Ensure Required - String Allowed values: Present, Absent Ensures that the MIME type mapping is Present or Absent. .EXAMPLE 1 configuration Sample_xIisMimeTypeMapping_RemoveVideo { param ( # Target nodes to apply the configuration [String[]] $NodeName = 'localhost', # Name of the website to modify [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String] $WebSiteName ) # Import the module that defines custom resources Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration Node $NodeName { # Install the IIS role WindowsFeature IIS { Ensure = 'Present' Name = 'Web-Server' } # Remove a bunch of Video Mime Type mappings xIisMimeTypeMapping Mp2 { Ensure = 'Absent' Extension = '.mp2' MimeType = 'video/mpeg' ConfigurationPath = "IIS:\sites\$WebSiteName" DependsOn = '[WindowsFeature]IIS' } xIisMimeTypeMapping Mp4 { Ensure = 'Absent' Extension = '.mp4' MimeType = 'video/mp4' ConfigurationPath = "IIS:\sites\$WebSiteName" DependsOn = '[WindowsFeature]IIS' } xIisMimeTypeMapping Mpeg { Ensure = 'Absent' Extension = '.mpeg' MimeType = 'video/mpeg' ConfigurationPath = "IIS:\sites\$WebSiteName" DependsOn = '[WindowsFeature]IIS' } # we only allow the mpg Video extension on our server xIisMimeTypeMapping Mpg { Ensure = 'Present' Extension = '.mpg' MimeType = 'video/mpeg' ConfigurationPath = "IIS:\sites\$WebSiteName" DependsOn = '[WindowsFeature]IIS' } } } |