For about 10 years now I’ve been wondering what would happen if you installed EVERY Windows feature and role onto a single box, so let’s try it! With this experiment I want to answer the following questions:
Can you actually install ALL of them on one box?
How long would it take to install all roles/features on one box?
How much disk space do Windows Roles and Features actually use?
What system resources does Windows use to install roles and features?
Setup
Item | Value | Note |
OS | Server 2019 Standard | Hyper-V VM - nesting enabled |
CPU | 8vCPUs | |
RAM | 16GB | |
Disk 1 (OS) | 60GB SSD | OS, Roles, Features |
We would like to know just how much disk space every feature and role will consume. Using Get-Volume we can filter for drive C and see the base capacity and remaining disk space:
Get-Volume | Where-Object {$_.DriveLetter -eq "C"}
In addition to disk space, we would like to know what system resources (CPU,DIsk,RAM) are utilized during the installation of roles and features. We have a Data Collector Set copied from the built-in System Performance collector set. The only change is that the collector set runs for 2 hours instead of 1 minute.
Process
First, we want to see what’s available and what’s installed currently. Get a list of all available features in Server 2019 with Get-WindowsFeature.
Get-WindowsFeature
When you issue “Get-WindowsFeature” you’re treated to a lengthy list of all installed and available roles and features in Server 2019. You can see some roles/features are installed by default such as File and Storage Services, .Net 4.7, PowerShell.
In order to work with this more easily, we want to:
Get a list of all features
Get a count of all features available and currently installed
Filter that list for non-installed features
Grab the name of each feature so that we can pass them into the next command for installation.
First, let’s assign the feature list to a variable.
$featureList = Get-WindowsFeature
Then, we’ll use the .Count method to see the full list of Windows Features.
$featureList.Count
265 Available features and roles!
Let’s see how many features are currently installed by default on Server 2019.
($featureList | where InstallState -eq "Installed").Count
13 roles installed by default - more than I would have expected!
Now, time to put in work. Let’s create a new variable and filter for roles/features that are not installed. We will also expand the Name of the feature/roles that the list can be passed into the Install-WindowsFeature command.
$nonInstalledFeatureList = $featureList | Where-Object InstallState -ne "Installed" | select-object -ExpandProperty Name
Now that we have a filtered list of non-installed Features and Roles, we can pass that into Install-WindowsFeature. We will also use Measure-Command to find the amount of time installing all features takes.
Measure-Command -Expression { foreach ( $feature in $nonInstalledFeatureList ) {Write-Host -ForegroundColor Cyan "Installing $feature..." Install-WindowsFeature -Name $feature } Write-Host -ForegroundColor Green "Complete!" }
Putting it all together in a function, available here at my GitHub.:
Observations
Using 16 vCPUs and 16GB of RAM on an M.2 SATA SSD, it took 1 hr, 1 minute 1 second to install (almost) all roles and features!
Not all features are compatible with each other! By calling $error we can see the errors which were encountered during the install.
Network Virtualization conflicts with Containers
SQL Server Connectivity conflicts with WID Connectivity
Web Application Proxy conflicts with ADFS
Installing (almost) All Windows Features uses 2.83GB of disk! I was actually surprised here, I was expecting more disk to be used by installing every feature and role.
Last but not least, installing windows features seems to mainly disk intensive, on average using only 6% of the CPU and 4GB of RAM and 132 IO/sec with and 10 disk queue length.
Thanks for reading! Please feel free to check out my other PowerShell posts!