function Get-RequiredServerFeaturesAndRoles { <# .SYNOPSIS Returns a hashtable array of tiered server features and roles used for server bootstrapping #> [CmdletBinding()] [OutputType([System.Object[]])] Param() $logLead = (Get-LogLeadName) # Initialize the result to Windows Features that are common between Windows Server and Windows Server Core. $result = @( @{"Name"="Tier1"; "Features"=@("Web-Server","WAS","Web-Client-Auth","Web-Cert-Auth","Web-Mgmt-Tools","Web-Http-Redirect","Web-Custom-Logging","Web-Log-Libraries");}, @{"Name"="Tier2"; "Features"=@("Web-Request-Monitor","Web-Http-Tracing","Web-Stat-Compression","Web-Basic-Auth","Web-IP-Security","Web-Url-Auth","Web-Windows-Auth","Web-ASP","Web-Asp-Net");}, @{"Name"="Tier3"; "Features"=@("Web-ISAPI-Ext","Web-ISAPI-Filter","Web-Mgmt-Compat","Web-Scripting-Tools","Web-Mgmt-Service");}, @{"Name"="Tier4"; "Features"=@("NET-HTTP-Activation","NET-Non-HTTP-Activ","NET-WCF-HTTP-Activation45","NET-WCF-TCP-Activation45","WAS-NET-Environment","Web-Dyn-Compression","Web-CGI","Web-Includes","Web-Lgcy-Scripting","Web-WMI","RSAT-AD-PowerShell","Telnet-Client","Web-WebSockets");} ) if ( Test-IsWindowsServerCore ) { Write-Verbose "$logLead : Detected Windows Server Core OS; omitting Features that are not supported." } else { # Inject Windows Server Features that are not present on Windows Server Core. $result[0].Features += "Windows-Identity-Foundation" $result[3].Features += "Web-Lgcy-Mgmt-Console" } return $result }