Search code examples
windowspowershellregistry

how to open or read copied system registry file without import in windows 10


I have copied system registry file C:\Windows\system32\config\system from another windows machine (VM). And I want to open it and list out some keys from "...\ControlSet.." I open the Regedit and tried to open it but Regedit showing me the option of import which giving the warning that the registry keys ill be get replaced.

So I want to open it with PowerShell if not possible then want some tool to open the file and list out the required keys from it.


Solution

  • In your PowerShell script, you can use reg load/unload to automate what you described above.

    $null = reg load HKU\CustomFolderName "c:\path\SYSTEM.DAT"
    ...
    script code here
    ...
    $null = reg unload HKU\CustomFolderName