I always open up PowerShell on
$randomcomputer and type
Get-WindowsFeature expecting to get a list of Windows features. Sometimes it doesn’t work and then I Google on why that’s the case, forgetting that I’ve been down this route umpteen times. So here’s a post for myself.
*-WindowsFeature cmdlets are available via the Server Manager module which in turn is either present by default (on servers) or installed via the Remote Server Admin Tools (on clients).
- Windows Server 2012: Modules are loaded automatically on demand so the
*-WindowsFeaturecmdlets are available without any additional steps.
- Windows Server 2008 R2: Import the Server Manager module and then the
*-WindowsFeaturecmdlets can be used.
- Windows 8: Install the Server Manager via RSAT. This makes the Server Manager module available for automatic loading and then the
*-WindowsFeaturecmdlets can be used. Windows 8 also provides
(Get|Enable|Disable)-WindowsOptionalFeaturecmdlets as part of the DISM module (which is present by default). These provide similar functionality to the
*-WindowsFeaturecmdlets (doesn’t work on remote computers though!). Add the
-Onlinewhen using these cmdlets as they can work with the running instance or a mounted Windows image.
- Windows 7: Installing the Server Manager via RSAT doesn’t help. It doesn’t include the Server Manager module and so the
*-WindowsFeaturecmdlets are not available. An alternative is to install the 3rd party Client Manager module which gives the
Get-WindowsFeature missing by rakhesh is licensed under a Creative Commons Attribution 4.0 International License.