Hi,
Have been collecting hardware hash from years without issue.
Today encounter this issue that hardware hash can not be collected, anyone has ever experienced this?
Hi,
Have been collecting hardware hash from years without issue.
Today encounter this issue that hardware hash can not be collected, anyone has ever experienced this?
You have the source code for that script. If not, it's here: Get-WindowsAutoPilotInfo.ps1
Line 211 looks like this:
$devDetail = (Get-CimInstance -CimSession $session -Namespace root/cimv2/mdm/dmmap -Class MDM_DevDetail_Ext01 -Filter "InstanceID='Ext' AND ParentID='./DevDetail'")
Assuming you're running it using to get data from "localhost", the CIM session is created like this (on line 199):
$session = New-CimSession
Hi,
YES, I have source code that looks like following but it didn't worked.
$wmi = Get-WMIObject -Namespace root/cimv2/mdm/dmmap -Class MDM_DevDetail_Ext01 -Filter “InstanceID=’Ext’ AND ParentID=’./DevDetail'”
$wmi.DeviceHardwareData | Out-File “$($env:COMPUTERNAME).txt”
Your code also shows the following error:
It's not MY code. That was taken right from the link to the source in my post.
Run the $session = New-CimSession before you run the $devDetail = (Get-CimInstance -CimSession $session -Namespace root/cimv2/mdm/dmmap -Class MDM_DevDetail_Ext01 -Filter "InstanceID='Ext' AND ParentID='./DevDetail'")
I see the code you posed used Get-WmiObject and not Get-CimInstance. Maybe (I don't know) a more recent version of the script should be used?
This is probably something you should take up with the author of the 3rd-party script?
Thanks for reply.
Are you able to get hash code on your machine with the following?
Hi there,
There are many ways to correct hardware harsh.The following methods are available to harvest a hardware hash from existing devices:
-Using Microsoft Endpoint Configuration Manager
-Using Windows PowerShell
-During OOBE by using the Diagnostics Page (Windows 11 only)
-From the Desktop using Settings > Accounts
You can try an alternate script from the below thread and see if that helps.
How to get hardware hash by all version of windows which support PowerShell https://answers.microsoft.com/en-us/windows/forum/all/how-to-get-hardware-hash-by-all-version-of-windows/14355e5b-cdab-4456-b376-ddf616220e4c
--If the reply is helpful, please Upvote and Accept it as an answer--
Could you elaborate how we can get hardware hash using
From the Desktop using Settings > Accounts
The link you mentioned is the same procedure I am working with PS script.
45 people are following this question.