A Microsoft platform for building and publishing apps for Windows devices.
Hi,
Thank you for posting in Microsoft Q&A,
If you’re asking for a “unique machine ID”, it helps to clarify what you need it for, because the best option differs by scenario.
1. UWP / MSIX app
Use Windows.System.Profile.SystemIdentification.GetSystemIdForPublisher(). This is the supported UWP API for a per-device identifier that is scoped to your publisher, and it avoids fragile ASHWID-style fingerprints (CPU/RAM/Disk). Also check SystemIdentificationInfo.Source to understand how durable it is on a particular device.
SystemIdentification.GetSystemIdForPublisher Method
SystemIdentificationInfo.Source Property
2. Hardware-rooted identity
Use the TPM Endorsement Key public key (EKPub) (via NCRYPT_PCP_EKPUB_PROPERTY). This is the most hardware-bound option and is typically stable unless the TPM/motherboard is replaced. Note this is more in the enterprise/attestation/provisioning category, may be restricted by policy, and has stronger privacy considerations.
I hope this helps.