Exporting the registry
Monday, March 12, 2012 at 12:00PM
Kieran Jacobsen in Coding, powershell

When it comes to manipulating the registry, PowerShell gives you a truckload of options, personally, if its something as simple as backing up and restoring entries, nothing beats the proven old fashioned methods.

I needed to backup some registry keys recently, this will be running in my usual template as a scheduled task. I wanted to know if there was every an issue when trying the export.

My code looked like:

$key is the registry path you want to export, and $destfile is the resulting .reg file you want to export to.

Article originally appeared on Aperture Science (http://kjacobsen.squarespace.com/).
See website for complete article licensing information.