Forum Discussion

22 Replies

  • AndreRadtke's avatar
    AndreRadtke
    Brass 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?

  • giladkeidar's avatar
    giladkeidar
    Brass Contributor
    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's avatar
        giladkeidar
        Brass Contributor
        try 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
    • FloFon's avatar
      FloFon
      Copper Contributor

      giladkeidar 

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

      • giladkeidar's avatar
        giladkeidar
        Brass Contributor
        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.
  • karthikajoy's avatar
    karthikajoy
    Copper Contributor
    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
    • stefeis's avatar
      stefeis
      Copper 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

       

       

    • shaunatInterserve's avatar
      shaunatInterserve
      Copper Contributor
      No 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 Clarke's avatar
        Ian Clarke
        Copper 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

      • karthikajoy's avatar
        karthikajoy
        Copper Contributor

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

    • Jannik_Reinhard's avatar
      Jannik_Reinhard
      Iron 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

  • 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

    • pvanberlo's avatar
      pvanberlo
      MCT
      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.