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

Updated:   |  Windows Server Core articles

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)

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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