Installs an optional Windows component/feature.
Install-WindowsFeatures [-Features] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
This function will install Windows features. Note that the name of these features can differ between different versions of Windows.
On Windows 2008, run the following for a list:
servermanagercmd.exe -q
On Windows7, run:
Get-WmiObject -Class Win32_OptionalFeature | Select-Object Name
This function should be considered an internal, private function. It would be best to use one of the feature-specifc Install-WindowsFeature*
functions. These are designed to be Windows-version agnostic.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Features | String[] | The components to enable/install. Feature names are case-sensitive. If on Windows 2008, run servermanagercmd.exe -q for a list. On Windows 7, run Get-WmiObject -Class Win32_OptionalFeature | Select-Object Name .
|
true | false | |
WhatIf | SwitchParameter | false | false | ||
Confirm | SwitchParameter | false | false | ||
CommonParameters | This cmdlet supports common parameters. For more information type Get-Help about_CommonParameters . |
Install-WindowsFeatures -Features MSMQ-Server
Installs MSMQ.
Install-WindowsFeatures -Features IIS-WebServer
Installs IIS on Windows 7.
Install-WindowsFeatures -Features Web-WebServer
Installs IIS on Windows 2008.