This is a quick post on an issue that I come across recently at a customer who was unable to install the IIS role for setting up a distribution point.
As we all know, IIS is a prerequisite for setting up a distribution point in Configuration Manager.
During the installation of the IIS feature, you need to provide the path to source files, this will be usually the SXS folder from the OS media file as shown below.
I have specified the SxS folder during the installation of IIS and made sure that, the OS version matches the ISO file that was downloaded.
This is the usual procedure that we all do to install the IIS feature and it always works, but in this case, it never worked for me.
Following is the error code:
The request to add or remove features on the specified server failed. The source files could not be found. Error Code 0x800f081f.
I tried a couple of times by changing the ISO to the latest one, but it failed with the same error code.
what other options do we have to install the IIS role now for DP to work?
If the SxS source files cannot be used by the server to install IIS, we will use the WIM file from the same ISO to install the IIS feature using Powershell cmdlet.
Following is the PowerShell syntax.
Install-windowsfeature web-server –source wim:D:\sources\install.wim:2
Here 2 refers to the image index.
How do we know what index to use? This is based on the OS edition installed on the server.
You can check the OS edition on the server using WINVER from the RUN command.
Once you are done with this, run the following DISM command against the source wim file to know the index.
dism /get-wiminfo /wimfile:E:\sources\install.wim
Index 2 refers windows server 2019 standard with desktop experience
If your OS is datacenter with desktop experience, you need to use index 4.
once we have all the necessary information, run the PowerShell to install the IIS role.
Install-windowsfeature web-server –source wim:D:\sources\install.wim:2
Status after the Powershell command.
likewise, you can install all other features using the same format.
If the standard practice doesn’t work, we take other routes to make things work 😊
Hope it helps!
2 Comments
can we use powershell to uninstall any windows features if any uninstall error using GUI ?
Hi,
Yes, you can use powershell cmdlet Uninstall-WindowsFeature to uninstall windows feature.
More information on https://docs.microsoft.com/en-us/powershell/module/servermanager/uninstall-windowsfeature?view=winserver2012r2-ps
Thanks,
Eswar