If you get a 0x800f0950 failure code when installing the IIS server role, it may be due to missing necessary updates for your operating system. You can try the following to resolve this issue:
-
Run Windows Update to make sure the operating system is up to date.
-
In Server Manager, right-click Local Server and select Windows PowerShell (Admin).
-
In PowerShell, run the following command to install .NET Framework 4.7.2:
Add-WindowsCapability -Online -Name NetFx4ServerFeatures -Source “C:\sources\sxs”
Make sure to replace "C:\sources\sxs" with the path to your Windows installation media.
-
Rerun the Add Roles and Features Wizard, selecting the Web Server (IIS) server role. Add other roles or features required by IIS to the installation, if required.
-
In the Select Features window, make sure the required IIS components and features are selected, and then continue with the installation process.
-
After the installation is complete, restart your computer for the changes to take effect.
If the solutions above don't resolve the issue, please try these additional steps:
-
Run the "sfc /scannow" command to check for corrupt or missing system files. If there is a problem, you will be prompted to repair or replace it.
-
Run the "DISM /Online /Cleanup-Image /RestoreHealth" command to fix issues in any OS image.