Posh Security

View Original

Exporting the registry

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.