Change the line in the script that reads "If( $OSInfo -match "Microsoft Windows 8" )" to read "If( $OSInfo -match "Microsoft Windows 8|Microsoft Windows 10|Microsoft Windows Server 2012" )". Then it will run on Windows 8+ and Server 2012 and R2. You could add Windows 7 in there as well, but I don't think Windows 7 stores the key the same way in the registry and I haven't tested it.