# WindowsFeatureSet takes long time

**URL:** <https://forums.powershell.org/t/windowsfeatureset-takes-long-time/8314>\
**Category:** DSC\
**Created:** [March 29, 2017, 6:30am UTC](https://forums.powershell.org/t/windowsfeatureset-takes-long-time/8314 "2017-03-29T06:30:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindaugas-kaucikas](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mindaugas-kaucikas](https://forums.powershell.org/u/mindaugas-kaucikas)\
**Post date:** [March 29, 2017, 6:30am UTC](https://forums.powershell.org/t/windowsfeatureset-takes-long-time/8314/1 "2017-03-29T06:30:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [March 29, 2017, 7:01am UTC](https://forums.powershell.org/t/windowsfeatureset-takes-long-time/8314/2 "2017-03-29T07:01:41Z")

</div>

It’s just how the installer works. It has to enumerate a ton of stuff under the hood and it’s time consuming. Rather than doing it in one batch, it’s doing each one individually, which means it has to unpack the files, check all the dependencies, copy all the bits, and whatnot - for each one. It’s even slower on a VM if you’re not real careful about disk I/O throughput - installations are always a little hellish on a VM unless the storage layer is super performant.

---

<div class="post-metadata">

**Author:** ![mindaugas-kaucikas](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mindaugas-kaucikas](https://forums.powershell.org/u/mindaugas-kaucikas)\
**Post date:** [March 29, 2017, 7:50am UTC](https://forums.powershell.org/t/windowsfeatureset-takes-long-time/8314/3 "2017-03-29T07:50:28Z")

</div>

I guess that’s the same as installing through Roles and Features wizard one subfeature at a time. So how can I speed it up without installing all unnecessary subfeatures?

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:16pm UTC](https://forums.powershell.org/t/windowsfeatureset-takes-long-time/8314/4 "2024-05-16T21:16:44Z")

</div>


