How to get the Hash ID for device which is already added to intune.

%3CLINGO-SUB%20id%3D%22lingo-sub-2566541%22%20slang%3D%22en-US%22%3EHow%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2566541%22%20slang%3D%22en-US%22%3E%3CP%3EHI%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20device%20in%20my%20tenant%2C%20for%20which%20i%20need%20to%20find%20the%20Hash%20id.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2566541%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2567167%22%20slang%3D%22de-DE%22%3ESubject%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2567167%22%20slang%3D%22de-DE%22%3EYou%20can%20download%20the%20device%20hash%20in%20the%20Mem%20portal%20under%20devices%20%26gt%3B%20enroll%20devices%20%26gt%3B%20devices.%20There%20you%20can%20select%20the%20effected%20device%20and%20click%20the%20Export%20button.%3CBR%20%2F%3E%3CBR%20%2F%3EAlternatively%20you%20can%20get%20the%20device%20hash%20directly%20on%20the%20device%20with%20the%20following%20command%3A%20%3CBR%20%2F%3E%20Get-WindowsAutoPilotInfo.ps1%20-OutputFile%20AutoPilotHWID.csv%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2567734%22%20slang%3D%22en-US%22%3EBetreff%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2567734%22%20slang%3D%22en-US%22%3EExporting%20from%20Endpoint%20Manager%20doesn't%20include%20the%20actual%20hardware%20hash%20in%20the%20exported%20CSV%20file.%20There%20currently%20does%20not%20seem%20to%20be%20a%20way%20to%20export%20the%20hardware%20hash%20of%20an%20Autopilot%20device%20directly%20from%20Endpoint%20Manager.%3CBR%20%2F%3E%3CBR%20%2F%3EUsing%20the%20script%20locally%20on%20the%20device%20will%20of%20course%20work%20and%20retrieve%20the%20HW%20hash.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2568884%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2568884%22%20slang%3D%22en-US%22%3EYou%20could%20create%20a%20pro%20active%20remediation...%20the%20only%20bad%20about%20pro%20active%20remediaitons%20that%20its%20limited%20to%202046%20characters.%20So...%3CBR%20%2F%3E%3CBR%20%2F%3E-Create%20some%20pro%20active%20rem%20which%20exports%20the%20hash%3CBR%20%2F%3E-store%20the%20information%20in%20a%20sharepoint%20site%20like%20damien%20did%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.systanddeploy.com%2F2021%2F02%2Fintune-troubleshooting-collect-remotely.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.systanddeploy.com%2F2021%2F02%2Fintune-troubleshooting-collect-remotely.html%3C%2FA%3E%3CBR%20%2F%3E-Make%20sure%20you%20clean%20up%20the%20intunem%20gt%20log%20like%20i%20showed%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcall4cloud.nl%2F2021%2F05%2Fthe-laps-reloaded%2F%23third-part%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcall4cloud.nl%2F2021%2F05%2Fthe-laps-reloaded%2F%23third-part%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2569407%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2569407%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20also%20use%20the%20following%20command%20to%20only%20get%20the%20device%20hash%20to%20send%20it%20to%20a%20storage.%20Therefor%20you%20don't%20need%20install%20the%20Get-AutoPilotInfo%20script.%3CBR%20%2F%3E%3CBR%20%2F%3E(Get-CimInstance%20-ClassName%20MDM_DevDetail_Ext01%20-Namespace%20root%5Ccimv2%5Cmdm%5Cdmmap).DeviceHardwareData%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2674803%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2674803%22%20slang%3D%22en-US%22%3EHI%20All%2C%3CBR%20%2F%3EThanks%20for%20all%20your%20reply.%20I%20have%20found%20one%20way%20to%20find%20the%20Hash%20ID%20from%20the%20portal.%20i.e%2C%20Via%20Device%20diagnostic.%20Which%20will%20provide%20you%20a%20cab%20file%20with%20all%20the%20logs.%20In%20that%20you%20can%20find%20the%20HASH%20ID.%20I%20will%20post%20the%20exact%20file%2C%20folder%20and%20Path%20location%20ASAP.%3CBR%20%2F%3EThanks%20%26amp%3B%20Regards%2C%3CBR%20%2F%3EKarthik%20Ajoy%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2676949%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2676949%22%20slang%3D%22en-US%22%3EHu%2C%20but%20you%20need%20to%20do%20this%20for%20each%20device%20right%3F%20so%20if%20you%20have%20got%20like%20200%20devices%20from%20where%20you%20need%20to%20extract%20the%20hash...%20i%20guess%20that%20would%20take%20some%20time%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2678252%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2678252%22%20slang%3D%22en-US%22%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F620702%22%20target%3D%22_blank%22%3E%40Rudy_Ooms%3C%2FA%3E%2C%20Yes%20you%20are%20right.%20this%20will%20help%20us%20to%20retrieve%20only%20one%20device%20at%20a%20time.%20This%20won't%20help%20you%20to%20get%20bulk%20one.%20At%20least%20one%20thing%20we%20have%20here%20is%20to%20retrieve%20hash%20from%20Console.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2985739%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20Hash%20ID%20for%20device%20which%20is%20already%20added%20to%20intune.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2985739%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1108179%22%20target%3D%22_blank%22%3E%40karthikajoy%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecan%20you%20please%20provide%20the%26nbsp%3B%3CSPAN%3Eexact%20file%2C%20folder%2C%20and%20Path%20location%20of%20HASH%20ID%20with%20in%20device%20diagnostics%20logs.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Emany%20thanks%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

HI, 

 

I have a device in my tenant, for which i need to find the Hash id. 

18 Replies

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

Exporting 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.
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

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

HI 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
Hu, but you need to do this for each device right? so if you have got like 200 devices from where you need to extract the hash... i guess that would take some time?
Hi @Rudy_Ooms, Yes you are right. this will help us to retrieve only one device at a time. This won't help you to get bulk one. At least one thing we have here is to retrieve hash from Console.

@karthikajoy 

 

can you please provide the exact file, folder, and Path location of HASH ID with in device diagnostics logs.

 

many thanks

why 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).

@giladkeidar 

we have some hybrid joined devices in Intune and would like to pull the hash IDs to deploy via autopilot

as 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.

@giladkeidar I have two tenant test and prod inside. I need the Hash ID for change b/w the tenants. 

try this
https://github.com/microsoftgraph/powershell-intune-samples/tree/8b4f760a460839de6ee1726c3159a484783...

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
Hi,

Didnt knew the manageddevices graph uri shows the hardware HASH.. so far as I know it only shows hardware information and not the needed hash?
yes you are right, I forgot it doesn't give the actual hash - so I believe the only way is using the "WindowsAutoPilotInfo" PS module.

If all devices are already enrolled to Intune I believe you can deploy a script which will export those settings and upload the data to Sharepoint list or any other online storage.

Hi @karthikajoy 

 

Can you please share the steps you did to get HWID from Intune?

where is the csv then stored?

Collect the diagnostic logs, after it uploaded to Intune you can download and get the hashID from that zip file @Soutumi