Save a registry key, its sub keys and values to a file. More information: https://docs.microsoft.com/windows-server/administration/windows-commands/reg-save.
reg save {{key_name}} {{path/to/file}}
reg save {{key_name}} {{path/to/file}} /y