Backs up reg keys for local or remote computer

This script will back up a specific registry key and all subkeys to a .reg file, on the local or a remote computer.

The user account you are running as must have r+w to the destination path. The filename will be saved as the (sanitised) key name from the registry. Destination can be a local file path or a network share (UNC).