Unable to install IIS on Server 2019 DC error 0x800f081f

Lucas Paixao Soares Ribeiro 1 Reputation point
2022-12-03T00:32:53.737+00:00

I`m getting this error:
266710-image.png

I tried the following commands:

Microsoft Windows [Version 10.0.17763.3650]  
(c) 2018 Microsoft Corporation. All rights reserved.  
  
C:\Users\Administrator.WIN-ONA542MGLKP>dism /online /enable-feature /featurename:NetFX3 /All  
  
Deployment Image Servicing and Management tool  
Version: 10.0.17763.3406  
  
Image Version: 10.0.17763.3650  
  
Enabling feature(s)  
[==========================100.0%==========================]  
The operation completed successfully.  
  
C:\Users\Administrator.WIN-ONA542MGLKP>  

--
PS C:\Users\Administrator.WIN-ONA542MGLKP> Install-WindowsFeature -name Web-Server -IncludeManagementTools -Source WIM:F:\sources\install.wim:4
Install-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f
At line:1 char:1
+ Install-WindowsFeature -name Web-Server -IncludeManagementTools -Sour ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
Exception
+ FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind
owsFeatureCommand

Success Restart Needed Exit Code      Feature Result  
------- -------------- ---------      --------------  
False   No             Failed         {}  
  
  
PS C:\Users\Administrator.WIN-ONA542MGLKP>  

It's important to note that all three commands below run correctly and don't return any errors, plus they all tell me that no corruption was found.

Commands:

sfc /scannow  
DISM /Online /Cleanup-Image /CheckHealth  
DISM /Online /Cleanup-Image /ScanHealth  
DISM /Online /Cleanup-Image /RestoreHealth  

266738-dism.log

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,805 questions
Internet Information Services
Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
442 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,561 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Anonymous
    2022-12-03T00:47:27.207+00:00

    You can also try a repair install by running setup.exe from the root of install media but time may be better spent standing up a new one, patch fully, migrate roles over and move on.

    --please don't forget to upvote and Accept as answer if the reply is helpful--


  2. Anonymous
    2022-12-03T03:09:33.367+00:00

    You can install here.

    266795-image.png


  3. Yurong Dai-MSFT 2,826 Reputation points Microsoft Vendor
    2022-12-05T09:47:41.167+00:00

    Hi @Lucas Paixao Soares Ribeiro ,

    You can try to clean up system components and specify an alternate Windows image repair source that will then be used to repair corrupted Windows images.
    Normally, automatic corruption repair provides files during a repair operation. But it is corrupted itself, you can use designated repair sources on the web or use Windows Update to retrieve the source files needed to enable features or repair your Windows image.
    Open an elevated Command Prompt window, type the following and press Enter:

    Dism.exe /online /Cleanup-Image /StartComponentCleanup  
    

    After the operation completes, run DISM Tools /RestoreHealth command and see if it worked.

    If you receive error 0x800f081f or 0x800f0906 Unable to download source, you must set an alternate source.
    You can configure your system to use an alternate repair source through a Group Policy setting, run gpedit.msc to open the Group Policy Editor, and navigate to the following settings:

    Computer Configuration > Administrative Templates > System

    Then in the right pane, double-click Specify settings for optional component installation and component repair setting. Select Enabled and enter Alternate source file path. Click Apply/OK and Exit.

    Note1: You must enter the fully qualified path to the new location in the Alternate Source File Path text box. Multiple locations can be specified when each path is separated by a semicolon. A network location can be a folder or a WIM file. If it is a WIM file, the location should be specified by prefixing the path with "wim:" and include the index of the image to be used in the WIM file. For example "wim:\server\share\install.wim:3".

    Note2: You will need to reserve and maintain remediation resources on your network that are kept up to date with the latest service updates, etc.
    To use a running Windows installation as the repair source, or a Windows side-by-side folder from a network share or removable media (such as a Windows DVD) as the file source, you can run DISM offline with the following command: DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess Here you have to replace C:\RepairSource\Windows with your Repair Source location. After the process is complete, DISM will create a log file at %windir%/Logs/CBS/CBS.log and capture any problems the tool found or fixed.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,
    Yurong Dai

    0 comments No comments

  4. Samuel Fikiru 0 Reputation points
    2024-07-05T07:53:36.93+00:00

    Hi there @Lucas Paixao Soares Ribeiro,

    I'm encountering the same error you described. Were you able to resolve the issue? I've tried the suggested solutions here but haven't had any luck.

    If you found another way to fix it, I'd really appreciate any additional tips you might have.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.