I'm troubleshooting an issue we're seeing with all of our Windows Server 2016 servers. The more features we add to the operating system, the slower the features are to add.
For example, execute Add-WindowsFeature -Name NET-Framework-Core
when I haven't added any other features, it operates at a normal pace.
However, after I've added a few dozen features (typically a web server), executing for example Add-WindowsFeature -Name Web-CGI
takes over 10 minutes. As you can imagine, this makes spinning up a new server exceedingly slow, as there are around 60 features that get added to each machine.
Executing the command with -LogFile
gives a useless log, reading like this:
5756: 2017-12-19 19:40:57.545 [ServerManagerPS] Complete initializing log file.
5756: 2017-12-19 19:40:58.199 [ServerManagerPS] 45d625fe-30ef-4636-a79f-5ed8b9546d68 Enumerate server component ended with Success.
5756: 2017-12-19 19:41:03.268 [ServerManagerPS] 45d625fe-30ef-4636-a79f-5ed8b9546d68 Alter server component started. Component names: Web-CGI
5756: 2017-12-19 19:41:03.286 [ServerManagerPS] 45d625fe-30ef-4636-a79f-5ed8b9546d68 Alter server component ended with InProgress. The progress is 20
5756: 2017-12-19 19:41:04.295 [ServerManagerPS] 45d625fe-30ef-4636-a79f-5ed8b9546d68 Alter server component started. Component names: Web-CGI
5756: 2017-12-19 19:41:04.314 [ServerManagerPS] 45d625fe-30ef-4636-a79f-5ed8b9546d68 Get alteration state ended with InProgress. The progress is 24.
5756: 2017-12-19 19:41:05.324 [ServerManagerPS] 45d625fe-30ef-4636-a79f-5ed8b9546d68 Alter server component started. Component names: Web-CGI
With the final two lines repeated over and over again.
Performing this operation via the GUI makes no difference - it's just as slow. Once the feature is eventually installed, Get-WindowsFeature
returns in an appropriate amount of time (almost instantly)
Has anyone else seen behaviour like this? Is there any way to delve deeper into the logs to find out what's going on?