Skip to main content

Copying New ADMX Files Over the Group Policy Central Store Triggers the Namespace Already Defined Error

Low severityActive Directory About 20 minutes to fix

Overview

Pasting new ADMX files over the Central Store leaves old templates behind. Rebuild the folder from one release and swap it in by renaming.

At a glance

Symptom
Every administrator who edits a GPO against the Central Store gets an Administrative Templates dialog as soon as they expand the Policies node.
Likely cause
The store now holds two template files that describe the same settings, and the Group Policy tools read both.
Impact
The damage is to the editing experience, not to clients.
Verification signal
The Policies node opens with no dialog once the clean folder is live.
Safe correction
Replace the mixed store with a clean folder built from one Windows release, then swap folders by renaming.
Rollback or recovery
Rolling back is two renames in reverse, and it restores exactly the store you had.

If you refreshed the Group Policy Central Store by copying a newer Windows PolicyDefinitions folder over the old one, the editor can end up with two template files that claim the same namespace. Click the Policies node under Computer Configuration or User Configuration and you get:

Namespace 'Microsoft.Policies.Sensors.WindowsLocationProvider' is already defined as the target namespace for another file in the store.
File \\contoso.com\SysVol\contoso.com\Policies\PolicyDefinitions\Microsoft-Windows-Geolocation-WLPAdm.admx, line 5, column 110

The cause is the overwrite itself: newer templates renamed or changed files, and copying on top keeps the old ones beside them. The lasting fix, which Microsoft’s Central Store guidance describes, is not to patch the live store file by file but to build a clean PolicyDefinitions folder from one Windows release, add your application templates, then swap folders by renaming, which keeps the old store as your way back.

Symptom

Every administrator who edits a GPO against the Central Store gets an Administrative Templates dialog as soon as they expand the Policies node. The geolocation message above is the common one. If the store also kept an old SearchOCR.admx next to a newer SearchOCR.adml, a second error can appear (Microsoft documents it when opening gpedit.msc):

Resource $(string id="Win7Only)' referenced in attribute displayName could not be found

Nothing changed in any GPO. The only change was the copy into SYSVOL.

Why the copy-over looks safe

A template refresh feels like a file update, and Windows Explorer makes it a one-step job: open \\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions, paste the contents of C:\Windows\PolicyDefinitions from a current Windows 11 machine, choose to replace the files with the same names. Every file Microsoft still ships gets updated. What the paste cannot do is remove a file Microsoft renamed or no longer ships, and the Group Policy tools read every .admx file in the folder, not just the new ones.

Root Cause

The store now holds two template files that describe the same settings, and the Group Policy tools read both. Microsoft documents that the Group Policy tools check the Central Store by default and use all .admx files in it. For the geolocation error, the same template has carried two names: LocationProviderADM.admx was renamed to Microsoft-Windows-Geolocation-WLPAdm.admx in Windows 10 RTM, and Microsoft’s notes show later Windows 10 builds shipping LocationProviderAdm.admx again. Whichever name the old store holds, a copy-over from a release that uses the other leaves both, and both declare the Microsoft.Policies.Sensors.WindowsLocationProvider namespace. The SearchOCR error is the same kind of mix: the Windows 10, version 1803 templates shipped a SearchOCR.adml without the Win7Only string that the older SearchOCR.admx still points to. Microsoft’s Central Store guidance says both issues are avoided by building a pristine folder from a base OS release.

Impact

The damage is to the editing experience, not to clients. Microsoft describes the geolocation message as informational: click OK and the Group Policy setting works as expected. The cost is that every administrator now learns to dismiss Administrative Templates errors, and the store is a mix of releases that nobody can describe. Because files in the Central Store replicate to every domain controller in the domain, any hand repair you make in it reaches them all, with no earlier copy to go back to unless you made one.

How to confirm the store is mixed

These checks only read. First, see which template folders exist beside the live one:

Get-ChildItem -Path "\\contoso.com\SYSVOL\contoso.com\Policies" -Filter "PolicyDefinitions*"

Then list every template that declares the geolocation namespace. One geolocation template is healthy; two is the trap:

Select-String -Path "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions\*.admx" -Pattern "Microsoft.Policies.Sensors.WindowsLocationProvider" -SimpleMatch -List

If the list holds both LocationProviderADM.admx and Microsoft-Windows-Geolocation-WLPAdm.admx, the store holds two generations of templates. Those two names are the ones that matter; ignore any other file the search happens to list. Check SearchOCR the same way, including its language files:

Get-ChildItem -Path "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions" -Filter "SearchOCR.adm*" -Recurse

An .admx and .adml with clearly different dates point to files from different releases.

The quick repairs that make the next refresh worse

Under pressure, people reach for the smallest edit: delete or rename the duplicate in the live store, or add the missing Win7Only line to SearchOCR.adml by hand. Microsoft does list those as workarounds, and each silences one dialog. But each edit lands in the live store and replicates to every domain controller, and the store stays a mix of releases, which is the condition that produced the errors. The next template refresh starts from the same muddle.

The other tempting move is to leave the Central Store alone and paste a downloaded template package into C:\Windows\PolicyDefinitions on your own workstation. Microsoft says to use the ADMX download packages only in the Central Store scenario, and that replacing files in c:\Windows\PolicyDefinitions isn’t supported. It also leaves each administrator editing against different templates, which is the problem the Central Store solves.

Correction

Replace the mixed store with a clean folder built from one Windows release, then swap folders by renaming. Work from an admin workstation with write access to SYSVOL, and agree a window in which nobody edits GPOs. Have your repository of application templates (Office, Edge, third-party) to hand. Whatever you put in the Central Store replicates to every domain controller, so copy templates only, never notes or exports; SYSVOL is a poor place for anything else, as scripts in SYSVOL that expose embedded credentials to domain users show.

  1. Back up the current store outside SYSVOL. Copy-Item -Path "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions" -Destination "\\fs01\AdmxArchive\PolicyDefinitions-before-rebuild" -Recurse. Precondition: the destination does not exist yet, so the copy creates it with the store’s contents.
  2. Build the new folder from one release. On a Windows 11 machine with its latest updates installed, run Copy-Item -Path "C:\Windows\PolicyDefinitions" -Destination "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions-25H2" -Recurse. Use the downloaded Administrative Templates folder instead if that is your source. Copy any extra language folders you need, such as de-DE, into it. The tools ignore this folder until it is renamed.
  3. Merge application templates only. Copy-Item -Path "\\fs01\AdmxRepository\Office\*" -Destination "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions-25H2" -Recurse, once per product. Check first that each product folder holds only that product’s files, and never copy old Windows templates back in.
  4. Swap the folders, back to back. Preview each rename with -WhatIf, then run them: Rename-Item -Path "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions" -NewName "PolicyDefinitions-old" followed immediately by Rename-Item -Path "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions-25H2" -NewName "PolicyDefinitions".

Following along? Tap a step’s number to tick it off.

Settings configured in your GPOs are stored in the GPOs, not in the templates, so the swap changes what the editor can display, not what clients receive. The same discipline applies to other Group Policy changes that look smaller than they are, such as a Preferences PATH item without Partial ticked.

Validation

The Policies node opens with no dialog once the clean folder is live. Run the Select-String check again: it should return one file. Open a GPO that uses application settings, such as Office, and confirm those settings still display rather than appearing as unknown. After SYSVOL replication has had time to run, list the folder through a second domain controller (\\DC02\SYSVOL\contoso.com\Policies) and confirm it shows the same PolicyDefinitions and PolicyDefinitions-old folders.

Rollback

Rolling back is two renames in reverse, and it restores exactly the store you had. Rename the live folder away with Rename-Item -Path "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions" -NewName "PolicyDefinitions-25H2", then put the old one back with Rename-Item -Path "\\contoso.com\SYSVOL\contoso.com\Policies\PolicyDefinitions-old" -NewName "PolicyDefinitions". The old store still shows the dialogs, which Microsoft calls informational, so rolling back costs nothing but the noise. If both SYSVOL folders are damaged, the copy taken in step 1 is outside SYSVOL and can be copied back with the same Copy-Item pattern.

Stop it happening at the next template release

Treat every Windows template release as a rebuild, never a paste. Keep the application templates in their own repository so the merge in step 3 is repeatable, name each built folder after its release, and review a new build while it still sits under its release name, before the rename makes it live. When the new store has run without problems, move PolicyDefinitions-old to an archive location outside SYSVOL rather than leaving copies there.

3

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Fix commands and configuration

PolicyDefinitions
Namespace 'Microsoft.Policies.Sensors.WindowsLocationProvider' is already defined as the target namespace for another file in the store.
File \\contoso.com\SysVol\contoso.com\Policies\PolicyDefinitions\Microsoft-Windows-Geolocation-WLPAdm.admx, line 5, column 110
SearchOCR.admx
4

When to escalate

Validation and rollback are covered in the sections above.

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

The KBY Brief

Fixed? Get the next one before it hits you: The KBY Brief

Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

More from KBY that goes with this config trap.

Discover more

Connected KBY resources