How to get unique Device IDs on Windows 10 Anniversary Update
<p>Previous iterations of Windows 10 have the <a href="http://msdn.microsoft.com/en-us/library/windows/apps/xaml/Windows.System.Profile.HardwareIdentification" rel="noreferrer"><code>HardwareToken</code> API (aka ASHWID)</a> to get a unique identifier for the device, but it had several drawbacks:</p>

<ul>
<li>It was only available on Desktop and Mobile platforms, which required you to add an Extension SDK to your project (and wasn't available on HoloLens or other platforms)</li>
<li>On the PC, the value could "drift" as hardware changed (even just plugging a laptop into a docking station would change the ID), so you needed <a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj553431" rel="noreferrer">complex backend logic to correlate device IDs</a></li>
<li>The value was specific to a single app, and couldn't be shared across apps by the same publisher</li>
</ul>

<p>Is there a new way in the Anniversary Update to get a more useful / stable ID that's consistent across all Windows 10 platforms? I want to use the ID in my apps to correlate telemetry from the same device for purposes of usage metrics and advertising. I will not use the value for identifying the user, creating anonymous accounts, encrypting data, or anything else like that. It will only be used for telemetry purposes. </p>

<p>I want to do something like:</p>

<pre class="lang-cs prettyprint-override"><code>var id = Windows.Something.GetDeviceId();  // hypothetical OS function
var telemetry = MyApp.GetUsageTelemetry(); // my own function

// Use (eg) HttpClient to send both id and telemetry to my 
// cloud infrastructure for processing and correlation
SendDataToCloudForProcessing(id, telemetry)
</code></pre>