Windows Server Core - Install or uninstall features and roles using PowerShell

by
Jeremy Canfield |
Updated: March 16 2020
| Windows Server Core articles
To install or uninstall features and roles in Server Core using PowerShell:
- At the command line, type powershell and press enter to use Windows PowerShell. The command line will display PS (example: PS C:\\Windows\\System32>)
- View available and installed features and roles:
- Type Get-WindowsFeature and press enter to view everything (the list of available features, and the features that are currently installed)
- Type Get-WindowsFeature | where Installed and press enter to view only installed roles and features
- Type Get-WindowsFeature | where InstallState -eq Available and press enter to view only the features and roles tha are available and not installed
- Type Install-WindowsFeature Role-or-Feature -IncludeManagementTools and press enter to install a role or feature (example: Install-WindowsFeature DNS -IncludeManagementTools). Under the Success header, if True is displayed, the installation was successful.
- Type Get-WindowsFeature | where Installed and press enter to confirm that the feature or role is checked
If you want to uninstall a feature or role, simply replace Install-WindowsFeature with Uninstall-WindowsFeature (example: Uninstall-WindowsFeature DNS)
Did you find this article helpful?
If so, consider buying me a coffee over at