If you find yourself looking at a Server execution failed error inside the Add roles and Features wizard, you must know you are not the only one.
A large number of users have reported encountering the same error message. It seems that this issue is most commonly found in servers running Server 2012 R2.
Here is what one user on Microsoft Technet forums had to say about his issue:
I have a virtual server running Server 2012 R2. When I try to use the Server Manager to get to the Roles & Features part to add the Desktop Experience role. It fails with the error “Online – Cannot get role and feature data”. I went to PowerShell and just tried the command “Get-WindowsFeature -ComputerName SERVER” and I get Server execution failed. I am logging in with the Administrator account, so I am pretty sure it’s not a permissions issue.
Because we know how important it is to be able to modify and add new roles and features to your Server 2012 R2 system, in today’s article we will explore some of the best troubleshooting methods available.
Please follow the steps presented here carefully and in the order that they were written. Also, it is recommended that you try to see if the issue is fixed after each of the methods.
This will allow you to find the least invasive solution to your issue, without exposing your system to any danger.
Server execution failed error when adding roles and features
1. Run SFC command inside PowerShell (Admin)
- Press the Win+X keys on your keyboard -> select PowerShell (Admin).
- Inside the command window -> type in sfc /scannow and press Enter.
- Wait for the process to complete and note if any errors were found.
- Check to see if the issue persists. If it does, please try the next method.
2. Run DISM command inside PowerShell (Admin)
- Press the Win+X keys -> select PowerShell (Admin).
- Inside the newly opened window -> type the following command:
dism /online /cleanup-image /restorehealth
- Press Enter to run the command.
- Wait for the process of repairing any issues to complete.
- Check to see if the issue is resolved.
3. Reboot your server to fix the Server execution failed error
The restart performed at this step will allow your system to install the necessary updates.
4. Perform a repair install using the root installer media
Even though this might mean that you need to reconfigure your server, it will allow you to get rid of the error message.
We hope this guide helped you get rid of the error Server execution failed while adding roles and features inside the wizard.
Please feel free to let us know if it did by using the comment section below.