Reputation: 975
When installing a Windows feature:
Install-WindowsFeature -Name Web-Server -IncludeAllSubFeature -Verbose:$false
How can I specify only required sub-features? E.g. .NET Extensibility 3.5, ASP.NET 3.5, Application Initialization etc. for Web-Server.
In place of -IncludeAllSubFeature
.
Upvotes: 1
Views: 4576
Reputation: 4069
you can use install-WindowsFeature -Name Web-DAV-Publishing
,once you get the subfeature name from get-windowsfeature
, as @Clijsters rightly suggested
You can also use DISM for that:
Dism /online /Enable-Feature /FeatureName:IIS-CGI /Featurename:IIS-websockets
Powershell version for the above command:
Enable-WindowsOptionalFeature -Online -FeatureName "IIS-serversideincludes","IIS-applicationinit"
To get the feature names, you can use Dism /online /Get-Features | Select-String socket
Upvotes: 1