iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Read this guide to learn how to install Windows Server roles, features, and roles management tools with the PowerShell Install-WindowsFeature command.
Overview
Most SysAdmins install Windows server roles with Server Manager. Server Manager is great because it can also deploy roles on remote servers.
However, PowerShell offers a faster way to perform the task on multiple servers. However, you need the role’s name to install it with PowerShell.
Recommended Free Tools
In step 1 below, I will show you how to find the name for any Server role you wish to install. After that, I will show you how to install the role.
Popular on Amazon
Task 1: Get the Role’s Name with Get-WindowsFeature
To find the name of a role, run the Get-WindowsFeature command and specify any word in the role. To specify the word in the role, use a * wildcard before and after the word.
For example, to find the role name for Active Directory Domain Services – use any work in “Active Directory Domain Services,” for example “directory” – with Get-WindowsFeature.
Here is the full command.
Get-WindowsFeature *domain* | Format-Table -AutoSize
The command returns all server roles that contain the phrase ‘directory’. If a role is not installed yet its Install State displays the Available.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute
To install the role, use the role’s name in the Name column.
Also popular on Amazon
Another example is Hyper-V. If you need to install the Hyper-V manager role without installing the Hyper-V role, get the name of the role by running the command below:
Get-WindowsFeature *Hyper-V* | Format-Table -AutoSize
The command returns all Hyper-V roles, including its management tools. On the Display Name column, “Hyper-V Management Tools” and its SubFeatures – “Hyper-V GUI Management Tools” and “Hyper-V Module for Windows PowerShell” – are checked.

This indicates that the “Hyper-V Management Tools” are installed on this server as confirmed by the “Install State” column.
Finally, if you need to install roles admin tools without installing the role, as I already explained, you can get the name of a specific management tool with the method I explained above. However, to return a list of all management tools, run the Get-WindowsFeature command with *RSAT*.
Also popular on Amazon
Get-WindowsFeature *RSAT* | Format-Table -AutoSize
I have highlighted some common role admin tools for Active Directory Domain Services (AD DS) and “Failover Cluster Management Tools.”

Task 2: Install the Role with Install-WindowsFeature
Once you have the name of the role, use the Install-WindowsFeature command to deploy the role.
For example, I will run the command below to install the Hyper-V Manager without installing the Hyper-V role.
Install-WindowsFeature -Name RSAT-Hyper-V-Tools
In another example to install the Failover Cluster Management Tool, I will use the get-winowsfeature command below to find the role name.
Also popular on Amazon
Get-WindowsFeature '*clustering*' | Format-Table -AutoSize

Then, install the Clustering admin tools and all its sub-features with this command. By the way, I have already installed the clustering management tool on the server I ran the above command.
Install-WindowsFeature -Name RSAT-Clustering
Finally, if you need to install any Windows Server role on multiple computers, you can list the names of the computers on a text file. Then, use the script below to deploy the roles on the servers.

I have included comments before each command to explain what the command does. All texts starting with # are comments.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →#Get a list of all the servers from the text file and save them in the $Servers variable
$Servers = Get-Content <path to the text file>
#Save the domain credential to use in installing the roles in the $Credential parameter
$Credential = Get-Credential domainname\username
#Install the roles on all the servers
#This script installs the DNS and Active Directory admin tools
ForEach ($Server in $Servers) {Invoke-Command -ComputerName $Server { Install-WindowsFeature -Name "RSAT-ADDS", "RSAT-DNS-Server" } -Credential $Credential -Verbose}
The screenshot below shows the result of the above script in action. I used the script to install the AD DS and DNS management tools on two servers.
Also popular on Amazon
The command’s results show whether the installation was successful and if the server requires a restart.

Task 3: Uninstall Roles with Remove-WindowsFeature
If you need to uninstall or remove a Windows Server role, use the Remove-WindowsFeature command. The example below removes the AD DS and DNS management tools from one of the servers where the roles were installed in step 2.
Invoke-Command -ComputerName IPMvVMM { Remove-WindowsFeature -Name "RSAT-ADDS", "RSAT-DNS-Server" } -Credential $Credential -Verbos
Conclusion
PowerShell provides a way to automate the installation of Windows Server roles on multiple servers. However, to install a Windows Server role, you require the role’s name.
Free tools Windows power users keep installed
One-click scans. No signup required.
Meanwhile, to get the name of a role, run the Get-WindowsFeature command. Then, install the role with the Install-WindowsFeature command.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

