The VBS script does not work for anything other than Windows 7. The value is stored in the registry with a substitution cipher (A = X, B = Q, that kind of thing), and the cipher has changed after Windows 7. So the VBS script does not work.
The PowerShell method is slightly different…this allegedly pulls the product key that is stored in your computer’s firmware. This key is burned into the same flash memory that holds your EFI firmware (your BIOS) and is part of that physical computer for life. If you upgraded your Windows 10 license, or if your computer originally shipped with Windows 7 or Windows 8.1, this key will be different, as this is the original key, not the one generated as part of your digital entitlement when you upgraded.
I believe he only sure way to get the correct key for your current Windows install is the NirSoft method, as it takes into account which version of Windows you have and does the correct replacement cipher when reading the value from the registry.