LGPO.exe (Local Group Policy Object Utility) is a small command-line utility released by Microsoft, which allows you to export and import local group policy easily. It’s really convenient if you want to make a backup of local group policy, or import it later on another computer.
This tutorial shows you how to use Microsoft’s command line tool LGPO to export / backup local group policy settings, and import them into another computer.
Download LGPO from Microsoft
Download the LGPO zip archive from Microsoft’s website. Unpack it locally and copy the resulting LGPO.exe file to C:\Windows\System32. Afterwards you can open an elevated Command Prompt for running the LGPO command to automate the management of local group policy. Alternative there is also the SCM tool, which allows you to specifically export .inf, firewall or audit files.
Export Local Group Policy Settings
To create a backup for local policy settings on your local PC, run this command at Command Prompt:
LGPO.exe /b backup_path
A new folder with GPO GUID appears in the target directory. It will contain all local policy settings for this computer. You can restore this backup to your local machine at any time you need it, or import it later into another computer.
Another way would be to work with:
secedit /export /cfg group-policy.inf /log export.log or secedit /configure /db %temp%\temp.sdb /cfg yourcreated.inf
Import GPO into Another PC
To restore Local Group Policy settings from the backup, import them by running the following command:
LGPO.exe /g backup_path
Once imported, restart your computer for the local group policy settings to take effect.
Why not copy the Registry.pol file manually?
Theoretically you could copy the Registry.pol file manually from the C:\WINDOWS\system32\GroupPolicy\Machine dir but I highly recommend you don’t do this because the file is maybe corrupted and you would import the same corruption into the new system.
Another thing is that it does not load the regular ‘Computer’ and ‘User’ Configuration Policies that are set made with ‘gpedit.msc’ – which is the ‘LOCAL GROUP POLICY’ only, you might not see SECURITY (made by secpol).
This method can help you easily deploy local group policy settings to other computers. As we all know, the Local Group Policy Editor is not present in Windows Home edition so you’re unable to edit the group policy locally. The LGPO utility makes it possible to copy the group policy settings from Windows Pro/Enterprise to Windows Home.
If you like to work there is also a fantastic article here.