Powershell Export Multiple Keys To One .reg File


I would like to export multiple registry keys to the same .reg file. Every suggestion I’ve seen shows to use reg /e [key name] filename.reg, but I have a list of 4-5 registry entries I want to export and doing it this way will overwrite it each time.
What I want is something like:

  • Export HKLM\Software\Test\ABC RegFile.reg
  • Export HKLM\Software\ABC\123 RegFile.reg
  • Export HKLM\Software\XYZ\Lala RegFile.reg

So that each registry key is appended to the same .reg file, not overwritten each time. How can I do this?


The simplest way would be to export each key individually, and then merge the resulting files:


Powershell Export Multiple Keys To One .reg File by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply