Add Active Directory Domain Services (AD DS) Role on Server 2016 Fails with Error: 0x800f0831

You just spun up a fresh server and it won’t install the Domain Controller Role. and you are frustrated. I am here to help. When attempting to install AD DS or .Net 3.5 you get this error. You will get the same error from the GUI or Powershell:

Install-windowsfeature -name AD-Domain-Services

The Error Code 0x800f0831 means Windows is attempting to check updates for the needed software package. This causes the hang/fail because it is not there. This is the error:

The request to add or remove features on the specified server failed. Installation of one or more roles, role services, or features failed. Error: 0x800f0831

Restarting doesn’t help, nor will most other “fixes” on the internet.

The problem is that you have the Windows installation disk attached (in my case to a virtual machine in VMware or in the disk drive after installation) so that is where Windows is trying to find the files.

Verify the Remote Registry service is running. Open Services on your machine and Start the Remote Registry service if it is not already running.

You can presumably unattach the disk and restart but I selected Specify an alternate source path on the Confirmation page.

Luckily there are instructions. The path on my system was as follows because the ISO was attached to the D: drive.

WIM:D:\sources\install.wim:4

Enter the path information into the box and click ok.

Now it will install without hanging or failure. I just saved you a big headache, shared the love.

 

Namespace ‘Microsoft.Policies.WindowsStore’ is already defined as the target namespace for another file in the store

Windows 10 Creators Update build 1703 came with a new set of .admx and .adml policy definitions. Everything was working fine but Microsoft changed the name of the Windows Store policy definition files and borked up a bunch of random unrelated GPO. If you view affected GPO in Group Policy Manager on your domain controller you may see this error in place of your normal settings information.

The error is:

Namespace ‘Microsoft.Policies.WindowsStore’ is already defined as the target namespace for another file in the store. File \FQDN-DC\SysVol\domain.com\ Policies\PolicyDefinitions\WinStoreUI.admx, line 4, column 80

To fix this issue go to your sysvol. Usually at path above or something similar:

\\SysVol\ yourdomain.com\Policies\PolicyDefinitions\

Delete the file: WinStoreUI.admx

Rename file WindowsStore.admx to WinStoreUI.admx

\\SysVol\ yourdomain.com\Policies\PolicyDefinitions\en-US (or whatever your language is)

Delete the file: WinStoreUI.adml

Rename file WindowsStore.adml to WinStoreUI.adml

Refresh the settings view in Group Policy Manager and you will see that your policy definitions are working again.

You are done!