Active Directory

Resolving "Namespace is already defined' Group Policy Error in Windows 10

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.

Sponsored Content

Passwords Haven’t Disappeared Yet

123456. Qwerty. Iloveyou. No, these are not exercises for people who are brand new to typing. Shockingly, they are among the most common passwords that end users choose in 2021. Research has found that the average business user must manually type out, or copy/paste, the credentials to 154 websites per month. We repeatedly got one question that surprised us: “Why would I ever trust a third party with control of my network?

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:

C:\Windows\PolicyDefinitions

And
C:\Windows\PolicyDefinitions\en-US

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.

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

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

 

Related Topics:

BECOME A PETRI MEMBER:

Don't have a login but want to join the conversation? Sign up for a Petri Account

Register
Comments (0)

Leave a Reply

Live Webinar - Thursday, December 2nd! Active Directory Masterclass: AD Configuration Strategies for Stronger SecurityREGISTER NOW - Thursday, December 2, 2021 @ 1 pm ET

Active Directory (AD) is leveraged by over 90% of enterprises worldwide as the authentication and authorization hub of their IT infrastructure—but its inherent complexity leaves it prone to misconfigurations that can allow attackers to slip into your network and wreak havoc. 

Join this session with Microsoft MVP and MCT Sander Berkouwer, who will explore:

  • Whether you should upgrade your domain controllers to Windows Server
    2019 and beyond
  • Achieving mission impossible: updating DCs within 48 hours
  • How to disable legacy protocols and outdated compatibility options in
    Active Directory

Sponsored by: