Local Group Policy Object Utility (Windows EXE)
What
LGPO.exe is Microsoft’s Local Group Policy Object Utilityutility. It lets administrators import, export, and apply local Windows Group Policy settings from the command line. This can be useful when deploying security baselines or LGPO.exelocal ispolicy a new command-line utilitysettings to automateWindows the management of local group policy. It replaces the no-longer-maintained LocalGPO tooldevices that shippedare withnot themanaged Securitythrough ComplianceActive ManagerDirectory (SCM),Group and the Apply_LGPO_Delta and ImportRegPol tools.
Policy.
When/Why
ManyLGPO.exe of the featurescan help importapply required local policy settings to yourWindows devices meetingso organizationthey policiesmeet foryour organization’s security compliance.and compliance requirements.
Features:
- Import settings into local group policy from GPO backups or from individual policy component files, including Registry Policy (registry.pol), security templates, and advanced auditing CSV files.
- Export local policy to a GPO backup.
- Parse a Registry Policy (
registry.) filepol)poltointo readable"“LGPOtext"text.”directlyThetooutputthecanconsole orbe redirected to afilefile,which can editededited, and imported back into local policy. - Build a new Registry Policy (registry.pol) file from "LGPO text".
- Enable group policy client side extensions for local policy processing.
Before you begin
gpupdate /force, a sign-out/sign-in, or a reboot.
Example: Deploy LGPO.exe with FileWave
registry.pol
GptTmpl.inf
Audit.csv
lgpo.txt
Create a Windows script in the Fileset.
Example appropriate LGPO command, for example:
LGPO.exe /m "%~dp0registry.pol" /v
gpupdate /force
Associate the Fileset with a test device first.
After validation, deploy to the intended device group.
How
The zip file contains the LGPO installer:
LGPO.zip LGPO.exe v3.0 - Local Group Policy Object utility
LGPO.exe has four modes:
- Import and apply policy settings;
- Export local policy to a GPO backup;
- Parse a registry.pol file to "LGPO text" format;
- Build a registry.pol file from "LGPO text".
To apply policy settings, use the LGPO.exe commands below, where one or more of the following (each of which can be repeated):
/g path import settings from one or more GPO backups under "path"
/m path\registry.pol import settings from registry.pol into machine config
/u path\registry.pol import settings from registry.pol into user config
/s path\GptTmpl.inf apply security template
/a[c] path\Audit.csv apply advanced auditing settings; /ac to clear policy first
/t path\lgpo.txt apply registry commands from LGPO text
/e <name>|<guid> enable GP extension for local policy processing; specify a GUID, or one of these names:
** "zone" for IE zone mapping extension
** "mitigation" for mitigation options, including font blocking
** "audit" for advanced audit policy configuration
/boot reboot after applying policies
/v verbose output
/q quiet output (no headers)
SomeThe examplefollowing GPOexamples policiesshow arecommon listedLGPO.exe below to use.commands. Be sure you are updating the correct path and names for your GPOs.
To create a GPO backup from local policy:
LGPO.exe /b path [/n GPO-name]
/b path Create GPO backup in "path"
/n GPO-name Optional GPO display name (use quotes if it contains spaces)
To parse a Registry.pol file to LGPO text (stdout):
LGPO.exe /parse [/q] {/m|/u} path\registry.pol
/m path\registry.pol parse registry.pol as machine config commands
/u path\registry.pol parse registry.pol as user config commands
/q quiet output (no headers)
To build a Registry.pol file from LGPO text:
LGPO.exe /r path\lgpo.txt /w path\registry.pol [/v]
/r path\lgpo.txt Read input from LGPO text file
/w path\registry.pol Write new registry.pol file
Validate the policy
After deployment, you can validate the result on the Windows device using one or more of the following:
gpupdate /force
gpresult /h C:\Temp\gpresult.html
You can also review the relevant local policy settings using the Local Group Policy Editor, where applicable.
Troubleshooting
/v for verbose output during testing.
Check whether the policy is machine-based or user-based before choosing /m or /u.
Reboot the device if the policy requires it.
Test rollback or backup procedures before broad deployment.