PowerShell: Determine Windows Feature Dependencies


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:





Labels: , , ,