Because the script reads sensitive Registry keys (DigitalProductId), heuristic antivirus engines sometimes flag it as "HackTool:Win32/Keygen." This is usually a . You can add an exclusion for your script if you trust the source code.
If your hard drive fails but the motherboard is fine, run get-keys.bat from a Windows PE USB drive to retrieve the key before reformatting. get-keys.bat
: This is the current standard for dumping prod.keys and title.keys directly from your own Nintendo Switch console. get-keys.bat