Fleex255 / PolicyPlus

Local Group Policy Editor plus more, for all Windows editions
Creative Commons Attribution 4.0 International
1.49k stars 109 forks source link

Command Line options #46

Open God-damnit-all opened 3 years ago

God-damnit-all commented 3 years ago

I've noticed that, a couple years back, someone forked the project to create command line options for the program, but surprisingly, he never opened an issue or push request on this repo. Maybe it was never truly finished and he lost interest: https://github.com/daveMueller/PolicyPlus/commits/UseCommandLineUtils

Though, one big flaw was that he had to separate the GUI and console versions, making it difficult to reapply his work.

It would be good to have command line features implemented, as LGPO.exe is a bit of a pain in the ass at times.

RokeJulianLockhart commented 1 year ago

@ImportTaste, until this is implemented, have you tried editing Group Policy settings via PowerShell's registry editing capability? I find that it's remarkably easy.

God-damnit-all commented 1 year ago

@ImportTaste, until this is implemented, have you tried editing Group Policy settings via PowerShell's registry editing capability? I find that it's remarkably easy.

Some policies have multiple registry entries associated with them, and while editing policies edits the registry values, I don't think the reverse is true, so you lose track of what's been changed.

RokeJulianLockhart commented 1 year ago

@ImportTaste, https://answers.microsoft.com/en-us/windows/forum/windows_11-other_settings/are-modified-registry-values-reflected-in-gpedit/30735292-6eec-4535-baa4-ac7491778691 might be vaguely useful.

Fleex255 commented 1 year ago

If you modify the Registry directly, the changes will not be reflected in the POL, so the Local Group Policy Editor would not see them. (Policy Plus only would if you opened a Registry source.)

As a workaround for the absence of command-line option support, it is possible to load Policy Plus into PowerShell as a .NET assembly and use its components from script: https://github.com/Fleex255/PolicyPlus/issues/5#issuecomment-390412472. Someone could even write a PowerShell module to make this process nicer.