Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you find a corresponding registry value to a setting in gpedit.msc?

My question is, how do I find the location of the registry value that corresponds to a gpedit.msc setting. I know that there are some references on technet, but they are outdated.

For instance, if I were to try to modify the setting, configure automatic updates, through regedit, how would I be able to find the location of its value in the windows registry? Is there some kind of area in gpedit that will tell me its location?

like image 704
lighthouse64 Avatar asked Oct 24 '25 15:10

lighthouse64


2 Answers

I had the same problem and the solution I found was using PowerShell with the PolicyFileEditor module. As far as PowerShell goes this is quite simple so don't worry about that. Taking it step by step this is what you have to do:

Start PowerShell in administrator mode

#Look up the module paths (you will probably get 3)
PS> $env:PSModulePath

#make sure you have the NuGet package
PS> Install-PackageProvider -Name NuGet -Force

#Enter the path with your username in it at the <path>
#(This only works if you have 
PS> Save-Module -Name PolicyFileEditor -Path <path>

#Install the module
PS> Install-Module -Name PolicyFileEditor

#Get the machine policy registry value's
Get-PolicyFileEntry -Path "$env:windir\system32\GroupPolicy\Machine\registry.pol" -all

#Get the user policy registery valeu's
Get-PolicyFileEntry -Path "$env:windir\system32\GroupPolicy\User\registry.pol" -all

If this all works correctly than you should get something like this (Depend on gpedit settings): :)

The PolicyFileEditor is quite handy as it can also export the gpedit registry settings and then import them, look here for more information. For more information on PowerShell itself I recommend the Microsoft virtual academe course.

There is however one problem with the PolicyFileEditor module and that is that while you can edit the registry these changes do not show up in the gpedit and you have to restart the computer for the changes to take effect (try testing with windows defender or something similar)

EDIT: after testing some more the LPG settings started showing up (After restart), i don't know what is up but you will have to test it for yourself.

Good luck.

like image 152
TheRWS96 Avatar answered Oct 26 '25 06:10

TheRWS96


There are different locations in registry for different settings in gpedit (Group Policies).

For the setting, "Configure Automatic updates", following registry gets edited.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\<GUID key>
like image 42
Ajit Medhekar Avatar answered Oct 26 '25 05:10

Ajit Medhekar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!