简体   繁体   中英

How do I change policy related things directly in Windows registry? (e.g. max pw age)

I am trying to edit local policies by directly editing the correlating Windows registry entries. Is there any overview about which policy is affecting which registry entry? For example which are the changes needed to set the max pw age?

The use-case is that I have to edit local policies by a Powershell script to quickly apply changes. I am using LGPO.exe provided by Microsoft to backup and parse the local policies but I am failing to apply changes to the parsed files as I don't know which registry entries are affected. The script itself works fine as I am able to change entries which where provided by the parsed policy file by assigning them other values.

Parsed registry entries (example):

Computer
Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
NoAutorun
DWORD:0

Computer
Software\Policies\Microsoft\Windows\BITS
EnableBitsMaxBandwidth
DWORD:1

Computer
Software\Policies\Microsoft\Windows\BITS
MaxBandwidthValidFrom
DWORD:10

EDIT:
I tried what ekbrothers told me but it did not work in my case unfortunately.
{regedit changes in HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\Parameters for DisablePasswordChange and MaximumPasswordAge}
{Correlating GPEdit key}
Also I tried to force applying the registry changes like described here:
{Why gpedit and the corresponding registry entries are not synchronized?}
It did not work either.
Looking for the registry.pol under C:\\Windows\\System32\\GroupPolicy I noticed that there is no .pol file where the settings are usally stored. Is this something to worry about?

I believe the Windows registry you are looking for that determines max pw age is HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\Parameters

In

DisablePasswordChange

Change to 1 (default 0)

And for maximumpasswordage

Change to

05 = 5 days 
07 = 7days 
1e = 30 days (default) 
0D = 15 days

I also recommend trying the group policy search website? for some more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM