When you choose to install a Windows Server Role or Feature using the GUI, the wizard gives you a summary of everything that will be included before you pull the trigger. If you choose to install a Role, the wizard will also confirm the default role services that will be installed.
However, when you need to install on Server Core, or when you're using PowerShell Remoting into another server, you don't have the luxury of a summary and nothing is confirmed. It just gets installed.
Here's a PowerShell one-liner you can use to gain some insight into all of the required dependencies of a Server Role or Feature without doing the actual install:
Install-WindowsFeature <FeatureName> -WhatIf
| Select -ExpandProperty FeatureResult
| FT -Auto
This is an example screenshot of the PowerShell output when installing ASP .NET 3.5.
Some things to note:
- You can use the same PowerShell command for Uninstall-WindowsFeature.
- Windows Features that are already installed will not be listed.
- Consider the output of the "Restart Needed" column carefully. I've seen situations where a message to restart the computer is displayed after a feature install/uninstall even though all items in the Restart Needed column were false.
Labels: powershell, PSRemoting, Windows Features, Windows Server 2012 R2