Forum Discussion
karthikajoy
Jul 20, 2021Copper Contributor
How to get the Hash ID for device which is already added to intune.
HI,
I have a device in my tenant, for which i need to find the Hash id.
22 Replies
Sort By
- AndreRadtkeBrass Contributor
I deleted my testdevice in Tenant A in intune. I want to enroll my test device in Tenant B one day later and while executing Get-WindowsAutoPilotInfo.ps1 -online (to publish the HARDWARE ID to tenant B) I am getting "error 808 ZtdDeviceAssignedToAnotherTenant". What can I do to remove / free the Hardware ID for this device, so that I can use it in Tenant B for testing purposes?
- giladkeidarBrass Contributorwhy do you need the hash? is it to register it to autopilot? id so not needed - when assigning an Intune enrolled device to an existing or new autopilot profile it will automatically enroll / register this device to autopilot (just make sure to check the "Convert all targeted devices to Autopilot" option within your autopilot profile).
- karthikajoyCopper Contributor
giladkeidar I have two tenant test and prod inside. I need the Hash ID for change b/w the tenants.
- giladkeidarBrass Contributortry this
https://github.com/microsoftgraph/powershell-intune-samples/tree/8b4f760a460839de6ee1726c3159a48478385edc/ManagedDevices
but you might need to re format the csv before importing to your other tenant.
if you use SCCM you can do it there also
- FloFonCopper Contributor
we have some hybrid joined devices in Intune and would like to pull the hash IDs to deploy via autopilot
- giladkeidarBrass Contributoras I answered in my original post - "just make sure to check the "Convert all targeted devices to Autopilot" option within your autopilot profile" - it will add any device that is part of that profile as autopilot device.
- karthikajoyCopper ContributorHI All,
Thanks for all your reply. I have found one way to find the Hash ID from the portal. i.e, Via Device diagnostic. Which will provide you a cab file with all the logs. In that you can find the HASH ID. I will post the exact file, folder and Path location ASAP.
Thanks & Regards,
Karthik Ajoy- stefeisCopper Contributor
karthikajoy I found this page and you didn't post the location. It's inside one of the .cab files which you will need to extract first. I have simplified it a bit, but you get the hash in here:
DiagLogs-devicename\FoldersFiles temp_MDMDiagnostics_mdmlogs-EXAMPLEDATE_cab\DeviceHash_devicenamexample.csv
- shaunatInterserveCopper ContributorNo need to question "why". I needed this for the same reason, to flip between 2 different tenants for test devices without having to find it physically. This solution works.
Within my DiagLogs, I found it in folder 46, in a CAB called mdmlogs-*. I extracted that and there is a CSV with the HashID inside.- Ian ClarkeCopper Contributor
shaunatInterserve I am about to follow the same process, as this will have no impact on a user during the prep to migrate our users to a new tenant. Thanks
- SoutumiCopper Contributor
- karthikajoyCopper Contributor
Collect the diagnostic logs, after it uploaded to Intune you can download and get the hashID from that zip file Soutumi
- You could create a pro active remediation... the only bad about pro active remediaitons that its limited to 2046 characters. So...
-Create some pro active rem which exports the hash
-store the information in a sharepoint site like damien did: https://www.systanddeploy.com/2021/02/intune-troubleshooting-collect-remotely.html
-Make sure you clean up the intunem gt log like i showed
https://call4cloud.nl/2021/05/the-laps-reloaded/#third-part- Jannik_ReinhardIron Contributor
You can also use the following command to only get the device hash to send it to a storage. Therefor you don't need install the Get-AutoPilotInfo script.
(Get-CimInstance -ClassName MDM_DevDetail_Ext01 -Namespace root\cimv2\mdm\dmmap).DeviceHardwareData
- Jannik_ReinhardIron Contributor
You can try to download the device hash in the Mem portal under devices > enroll devices > devices. There you can select the effected device and click the Export button.
Alternatively you can get the device hash directly on the device with the following command:
Get-WindowsAutoPilotInfo.ps1 -OutputFile AutoPilotHWID.csv- luca_bugejaCopper Contributorwhere is the csv then stored?
- pvanberloSteel ContributorExporting from Endpoint Manager doesn't include the actual hardware hash in the exported CSV file. There currently does not seem to be a way to export the hardware hash of an Autopilot device directly from Endpoint Manager.
Using the script locally on the device will of course work and retrieve the HW hash.