Kieran Jacobsen

Kieran Jacobsen

He/Him. Microsoft MVP and GitKraken Ambassador. 🌏 Poshsecurity.com. 🏳‍🌈 Gay. 🐱 Cat owner.

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.

Volume Health Checks in PowerShell

Physical Disks, SMART and PowerShell