---
title: "Discussion on \"Fix for incorrectly named devices enrolled using Autopilot through Azure Automation\" | Hashnode"
description: "Discussion on \"Fix for incorrectly named devices enrolled using Autopilot through Azure Automation\". How to make sure that AAD-joined Autopilot devices will have the correct hostname?"
url: "https://hashnode.com/posts/fix-for-incorrectly-named-devices-enrolled-using-autopilot-through-azure-automation/6377cf4fface77f5a7bc0709"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Fix for incorrectly named devices enrolled using Autopilot through Azure Automation](https://doitpshway.com/fix-for-incorrectly-named-devices-enrolled-using-autopilot-through-azure-automation?utm_source=hashnode&utm_medium=feed)

How to make sure that AAD-joined Autopilot devices will have the correct hostname?

Nov 18, 2022 · 4 min read · doitpshway.com  
Updated Nov 30, 2022  
Read the article

-   [#powershell](https://hashnode.com/tag/powershell)
-   [#intune](https://hashnode.com/tag/intune)
-   [#autopilot](https://hashnode.com/tag/autopilot)

## Written by

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

@AndrewZtrhgf · Czech Republic

  
[View profile](https://hashnode.com/@AndrewZtrhgf)

System Administrator that loves PowerShell

I work as System Administrator for more than 15 years now and I love to make my life easier by automating work &amp; personal stuff via PowerShell (even silly things like food recipes list generation).

## Responses 1

Markdown supported · ⌘↵ to post

[Ryan Pertusio](https://hashnode.com/@rpertusio)

[Nov 19, 2022](https://hashnode.com/posts/fix-for-incorrectly-named-devices-enrolled-using-autopilot-through-azure-automation/6377cf4fface77f5a7bc0709/comment/6378342a1c7f8b86d18f6d59)

Thanks for this!

You'll actually notice that the correct profile _does_ make it to the device. I put in a ticket. Microsoft Support says there's a 3 minute hard-coded timeout. If the work (in that 3 minutes, including PC rename) isn't completed in time, it moves on, leaving a generic name. It's apparently not going to be an easy one to fix on MS side.
