Quantcast
Channel: Group Policy forum
Viewing all articles
Browse latest Browse all 19997

Editing a GPO XML file

$
0
0

Can anyone think of any risks / downsides to directly editing an xml file containing the settings for a GPO?

I'm looking for a way to create a new GPO via PowerShell which configures the User Configuration\Preferences\Windows Settings\Drive Maps\ settings.

Since I can't directly configure those settings via PowerShell, and because the new GPO is almost the same as an existing GPO, I can copy an existing GPO to create the new one, and I can then configure the relevant security filtering etc via PowerShell. What I can't do is edit the location and label settings of the GPO via PowerShell's Group Policy cmdlets.

But, all of those settings are stored in the drives.xml file within the GPO's sysvol folder, so I was considering editing that file. I've confirmed in testing that if I edit the file the change gets picked up by GPM, but I'm wondering if there's any reason I haven't thought of that this would be a bad idea.

Assuming it's fine, which copy of the .xml file should I update? I see there are two copies showing on my server.

c:\windows\SYSVOL\domain\Policies\{<policy ID>}\User\Preferences\Drives\Drives.xml
c:\windows\SYSVOL\sysvol\<my domain>\Policies\{<policy ID>}\User\Preferences\Drives\Drives.xml

and while I can see that editing either of these results in the GPM displaying the updated info, and the other file being updated, I'm unsure which I should update.


Viewing all articles
Browse latest Browse all 19997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>