Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In Windows Server, the Server Manager console and Windows PowerShell cmdlets for Server Manager enable you to add roles and features to a local or remote server, or offline virtual hard disk (VHD). You can add multiple roles and features at the same time. This article describes how to add or remove roles and features in Windows Server, including multiple servers concurrently.
For more information about what roles and features are available in Windows Server, see Comparison of Windows Server editions.
Prerequisites
Before you add or remove roles, role services, and features, ensure that you meet the following prerequisites:
Use a user account that's an administrator. You also need to be an administrator on any remote servers that you're managing by using Server Manager, or offline VHDs that you're mounting.
Review and understand any dependencies or prerequisites specific to the roles or features you plan to add, as some roles might require extra configuration or services to function correctly. For more information, see Configure Features on Demand in Windows Server.
Provide the installation media or an alternate source path for the files that are required to add certain features, such as .NET Framework 3.5.
To add roles and features on remote servers, add them to Server Manager. For more information about how to add servers to Server Manager, see Add Servers to Server Manager.
To add roles and features to an offline VHD, the target VHD must meet the following requirements:
- The VHD must be running the release of Windows Server that matches the version of the server the VHD are mounted to.
- Ensure the VHD files aren't in use by other processes or mounted elsewhere.
- The VHD can't have more than one system volume or partition.
- For a VHD stored on a network shared folder, you must grant Read and Write permissions to the computer (or local system) account of server that you select to mount the VHD. User-only account access isn't sufficient.
Note
You can add roles and features on remote servers with Server Manager on same version of Windows Server or earlier. This requirement includes using the equivalent Windows client version with Remote Server Administration Tools (RSAT). For example, Windows Server 2025 can also add roles and features on Windows Server 2022, but Windows Server 2022 can't add roles and features on Windows Server 2025.
This article doesn't cover adding Remote Desktop Services (RDS) roles, which has a different installation process in Server Manager. For more information about adding RDS roles, see Deploy a Remote Desktop Services environment.
Add roles and features to Windows Server
You can add roles and features on a local server, a remote server that is added to Server Manager, or an offline VHD, using the Add Roles and Features Wizard in Server Manager, or by using Windows PowerShell cmdlets.
Select the relevant tab.
To add roles and features using the Roles and Features Wizard in Server Manager, follow these steps:
Open the Start menu, type Server Manager, then open Server Manager.
Select Manage in the top-right corner, then select Add Roles and Features. The Add Roles and Features Wizard opens.
For Before You Begin, review the information, then select Next.
For Installation Type, select Role-based or feature-based installation, then select Next. Use this option to add all roles and feature except Remote Desktop Services. For more information about adding RDS roles, see Deploy a Remote Desktop Services environment.
For Server Selection, select the server you want to add roles and features on. You can choose the local server or a remote server that is added to Server Manager. If you want to add roles and features on an offline VHD, select Select a virtual hard disk, select the server on which to mount the VHD, then browse or enter its file path. Select Next.
For Server Roles, select the roles you want to add. You don't have to select any roles if you only want to add a feature. Once you made your role selections, select Next.
As you proceed, the wizard automatically informs you if conflicts are found on the destination server that can prevent adding selected roles or features or normal operation. You're also prompted to add any other roles and features that the roles or features that you select require.
If you plan to manage the role remotely, either from another server, or from a Windows client-based computer that is running Remote Server Administration Tools (RSAT), you can opt not to install management tools and snap-ins for roles on the destination server. By default, management tools are added.
For Features, select the roles you want to add. You don't have to select any features if you only want to add a role. Once you made your feature selections, select Next.
For Confirmation, review the roles and features you selected. Once you're ready, select Install. Some roles and features require you to restart the server after installation. Check the box Restart the destination server automatically if required if you want the server to restart automatically after installation.
Tip
If you need to specify the installation source files, select Specify an alternate source path. You can also specify a Windows Imaging (WIM) file in the following format, with
WIM
as a prefix, and the index in which the feature files are located as a suffix, for exampleWIM:e:\sources\install.wim:4
. However, you can't use a WIM file directly as a source for adding roles and features to an offline VHD. You must either mount the offline VHD and point to its mount path for source files, or you must point to a folder that contains a copy of the contents of the WIM file. The source path or file share must grant Read permissions to the computer account of the destination server; granting user account access isn't sufficient. For more information on listing the indexes in a WIM file, see List images that are contained in a WIM or VHD file.You can also export your selections to an XML-based configuration file that you can use for unattended installations with Windows PowerShell. To export the configuration you specified, select Export configuration settings, then save the XML file to a convenient ___location. You can find the steps to use this configuration file in the section Add roles and features on multiple servers.
Once the installation is complete, select Close.
Remove roles and features from Windows Server
You can remove roles and features on a local server, a remote server that is added to Server Manager, or an offline VHD, using the Remove Roles and Features Wizard in Server Manager, or by using Windows PowerShell cmdlets.
Select the relevant tab.
To remove roles and features using the Roles and Features Wizard in Server Manager, follow these steps:
Open the Start menu, type Server Manager, then open Server Manager.
Select Manage in the top-right corner, then select Remove Roles and Features. The Remove Roles and Features Wizard opens.
For Before You Begin, review the information, then select Next.
For Server Selection, select the server you want to remove roles and features on. You can choose the local server or a remote server that is added to Server Manager. If you want to remove roles and features on an offline VHD, select Select a virtual hard disk, select the server on which to mount the VHD, then browse or enter its file path. Select Next.
For Server Roles, select the roles you want to remove. You don't have to select any roles if you only want to remove a feature. Once you made your role selections, select Next.
As you proceed, the wizard automatically prompts you to remove any other roles and features that the roles or features that you select require.
For Features, select the roles you want to remove. You don't have to select any features if you only want to remove a role. Once you made your feature selections, select Next.
For Confirmation, review the roles and features you selected. Once you're ready, select Remove. Some roles and features require you to restart the server after removal. Check the box Restart the destination server automatically if required if you want the server to restart automatically after removal.
Once the removal is complete, select Close.
Virtual Agent
If you're having trouble installing or removing roles and features, you can try our Virtual Agent. It can help you quickly identify and fix issues related to roles and features.