Resolving “Namespace is already defined’ Group Policy Error in Windows 10

Posted on June 9, 2016 by Daniel Petri in Active Directory with 0 Comments

health-debug-hero

I recently went to a customer, where I had to modify some local Group Policy settings on a few computers. As you might know, this is done by opening the Local Group Policy Editor. While it all went perfectly fine on Windows 7 and 8.1 computers, when I attempted to perform the same change on a Windows 10 machine, I received an error that I haven’t seen before.

The error you are getting looks like this:

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

File C:\WINDOWS\PolicyDefinitions\Microsoft-Windows-Geolocation-WLPAdm.admx, line 5, column 110

Namespace Group Policy error in Windows 10. (Image Credit: Daniel Petri)

Namespace Group Policy error in Windows 10. (Image Credit: Daniel Petri)

Note: The error may also occur when you open an Active Directory-based Group Policy Object (GPO) from a Windows 10 machine, the only difference is that the error is slightly different, where <forest.root> represents your domain name.:

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

File
\\<forest.root>\SysVol\<forest.root>\Policies\PolicyDefinitions\Microsoft-Windows-Geolocation-WLPAdm.admx, line 5, column 110

You can click “OK” to ignore the error message, and the Group Policy setting works as expected.

So what’s the reason for this error? How do we fix it?

It turns out that the reason for this error is because in Windows 10, the “LocationProviderADM.admx” file was renamed to “Microsoft-Windows-Geolocation-WLPAdm.admx”. Additionally, “LocationProviderADM.adml” file was renamed to “Microsoft-Windows-Geolocation-WLPAdm.adml”.

On a local computer, the path for these files is:

And

The policy definitions folder in Windows. (Image Credit: Daniel Petri)

The policy definitions folder in Windows. (Image Credit: Daniel Petri)

error-gpo-win10-3

However, as you can see from the above screenshots, the old files are still present on the computer, and since they both point to the same Group Policy namespace, you get a conflict as to where they are located.

While you can safely ignore the error and continue working with the GPO, it’s still annoying enough to want to make it go away. So, to fix this error, you must delete the old files “LocationProviderADM.admx” and “LocationProviderADM.adml”, and the new files “Microsoft-Windows-Geolocation-WLPAdm.admx” and “Microsoft-Windows Geolocation-WLPAdm.adml” must be renamed to “LocationProviderADM.admx” and “LocationProviderADM.adml”, respectively.

Sponsored

There’s one tricky part here, because it seems that changing, modifying or deleting these files is not a simple as it sounds due to permission restrictions. The files in that folder have their permissions configured so that nobody, including the administrator, can modify them.

Alas, there’s a way to change the ownership of the files. What we need to do is to take ownership of these files, and then and only then can we modify their NTFS permissions, which will then open to door for changing, modifying or deleting them.

To do this, right-click the first file and select “Properties”.

error-gpo-win10-4

Click the “Security” Tab, then click the “Advanced” button.

In the new window click “Change” next to the current owner and change the owner to your user (assuming you’ve logged on with a user that is member of the local Administrators group). Click “OK”.

error-gpo-win10-5

error-gpo-win10-6

Now you can change the NTFS permissions of who can modify the file. Back on the “Security” tab click “Edit”.

Click to select “Administrators” and select “Full Control”. Click “OK” and then “Yes” to acknowledge.

error-gpo-win10-8

Check that “Administrators” indeed have “Full Control”. Click “OK”.

error-gpo-win10-9

Repeat this procedure on all four files.

Now, delete the files “LocationProviderADM.admx” and “LocationProviderADM.adml” files.

You may be asked to provide administrative permissions. Click “Continue”.

error-gpo-win10-10

Sponsored

Finally, rename “Microsoft-Windows-Geolocation-WLPAdm.admx” and “Microsoft-Windows Geolocation-WLPAdm.adml” to “LocationProviderADM.admx” and “LocationProviderADM.adml”, respectively.

 

Sponsored