How to install or uninstall features and roles in Server Core using PowerShell

Home > Search > How-to
  by

To install or uninstall features and roles in Server Core using PowerShell:

  1. At the command line, type powershell and press enter to use Windows PowerShell. The command line will display PS (example: PS C:\\Windows\\System32>)
  2. 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
  3. 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.

 

  1. 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)

 

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments