I have a need to use C++ to obtain the unique TPM information – like a Serial Number.
My system is running Windows 10/64. This is on an HP Desktop PC with TPM 2.0 chip.
I can use PowerShell
Get-TpmEndorsementKeyInfo -hashalgorithm sha256
To get this output:
ManufacturerCertificates : {[Subject]
                             TPMVersion=id:073E, TPMModel=SLB 9670 TPM2.0, TPMManufacturer=id:49465800
                             CN=Infineon OPTIGA(TM) RSA Manufacturing CA 034, OU=OPTIGA(TM) TPM2.0, O=Infineon Technologies AG, C=DE
                           [Serial Number]
But how can I get this same Serial Number information using C++?