Convert Windows Registry .reg files to Group Policy Preferences-compatible XML files using PowerShell.
This script simplifies the process of deploying multiple registry settings via GPO. Instead of manually editing XML, you can export registry settings from a reference machine and convert them into GPP XML using this tool.
This PowerShell script converts exported Windows Registry files (.reg) into XML format for use with Group Policy Preferences. It supports all common registry value types:
REG_SZREG_EXPAND_SZREG_MULTI_SZREG_BINARYREG_DWORDREG_QWORD
- PowerShell version 3 or higher
- A valid
.regfile (e.g., exported from a reference machine)
| Parameter | Required | Description |
|---|---|---|
FilePath |
β Yes | Full path to the .reg file |
ActionType |
β No | GPP action to apply: Create, Delete, Update, or Replace (default: Update) |
# Basic conversion (default action = Update)
Convert-RegToGppXml.ps1 -FilePath "C:\MyTestRegFile.reg"
# With spaces in path
Convert-RegToGppXml.ps1 -FilePath "C:\Sub Folder\MyTestRegFile.reg"
# Specify action type (e.g., Create)
Convert-RegToGppXml.ps1 -FilePath "C:\MyTestRegFile.reg" -ActionType Create
# Combine path with custom action
Convert-RegToGppXml.ps1 -FilePath "C:\Sub Folder\MyTestRegFile.reg" -ActionType Replace- Only .reg files with standard formatting are supported.
- Paths and values are preserved and translated to the correct GPP structure.
- The generated XML conforms to Microsoft's GPP schema.
If you find this project useful or have suggestions, feel free to:
- β Star the repository
- π Submit issues
- π§ Contribute improvements via pull request
Active Directory Delegation Wizard https://github.com/janweis/Active-Directory-Delegation-Powershell-Wizard