reg-save
Save a registry key, its subkeys, and values to a native .hiv file. tldr-pages
On Windows
Windows
Save a registry key, its subkeys, and values to a specific file
reg save key_name path\to\file.hivIdentifyMatches documented abuse: Credentials (T1003.002)
Forcefully (assuming yes) overwrite an existing file
reg save key_name path\to\file.hiv /yIdentify/yOverwrites an existing file with the name *filename* without prompting for confirmation. Windows commands referenceMatches documented abuse: Credentials (T1003.002)