Hi,
IIS installation through Roles and Features wizard takes about 4 minutes
The same amount of time it takes if I use WindowsFeature resource.
configuration Install-IIS{ Import-DscResource -ModuleName PSDesiredStateConfiguration node localhost{ WindowsFeature IIS{ Ensure = 'Present' Name = 'Web-Server' IncludeAllSubFeature = $true } } } Install-IIS -OutputPath $PSScriptRoot Start-DscConfiguration -Path $PSScriptRoot -ComputerName localhost -Wait -Verbose
but I don’t need all sub features…
So I decided to use WindowsFeatureSet
configuration Install-IIS{ $features = 'Web-Default-Doc', 'Web-Dir-Browsing', 'Web-Http-Errors', 'Web-Static-Content', 'Web-Http-Logging', 'Web-Request-Monitor', 'Web-Stat-Compression', 'Web-Filtering', 'Web-Basic-Auth', 'Web-Windows-Auth', 'Web-Net-Ext', 'Web-ASP', 'Web-Asp-Net', 'Web-ISAPI-Ext', 'Web-ISAPI-Filter', 'Web-WebSockets', 'Web-Mgmt-Console', 'Web-Scripting-Tools', 'Web-Net-Ext45', 'Web-Asp-Net45' Import-DscResource -ModuleName PSDesiredStateConfiguration node localhost{ WindowsFeatureSet IIS{ Ensure = "Present" Name = $features } } } Install-IIS -OutputPath $PSScriptRoot Start-DscConfiguration -Path $PSScriptRoot -ComputerName localhost -Wait -Verbose
but it takes about 43 minutes. Why so long?