Install IIS 10 on Windows via PowerShell
This post would show you how to install IIS 10 on Windows 10/Windows Server 2016 via PowerShell.
Microsoft provides a way to install IIS 8.5 via PowerShell, so can we get steps for IIS 10?
How to Learn Module Names?
You might wonder from where this IIS 8.5 table comes from, but can you try to run the following command at PowerShell and analyze its output,
1
Get-WindowsFeature
And you will easily see all features/sub-features (or roles/role-services) are listed (and they are just the information in the table),
OK, Why Module Names Remains The Same?
Don’t be surprised that the text 45
in short module names remain while their feature names are using 4.6
.
Should be
4.7
or4.8
now for Windows 10 Creators Update and above.
Bad naming convention, but that’s just because Windows 10/Windows Server 2016 ships with .NET Framework 4.6.x.
By keeping the same module names, Microsoft allows your previous installation scripts for IIS 8.5 to apply also to IIS 10 machines.
That can explain why there isn’t an IIS 10 specific article in Microsoft Docs.