I've run into a strange situation with two laptops that got assigned identical random hostnames by Windows. At my company, we just received a batch of laptops at another office, and while we don't have Intune set up yet, we have one person going through the Out-Of-Box Experience (OOBE) to install our management software.
Upon remote access, I noticed that the necessary scripts hadn't executed properly, and I found a discrepancy with the username on the overview. To my surprise, one laptop had the same exact random hostname as another device that was deployed months prior, and they're not even from the same batch. I'm really confused as to how this happened. Any insights or similar experiences?
8 Answers
We've experienced something similar, but in our case, it didn’t cause any issues since one device was ARM and the other one was x86.
A simple fix would be to run a PowerShell script daily that renames devices to follow your naming convention. This way, you can avoid duplicate names entirely, aligning with how Intune functions when it verifies devices.
If the devices aren't using unique names and you're not renaming the defaults, it's worth checking if you are deploying imaged machines instead of fresh ones. Unsysprepped images might lead to this issue.
That's really odd! Usually, a wildcard should generate a random name, so two machines getting the same one is unlikely. But I guess randomness is tricky; you can sometimes end up with duplicates due to how the system works.
Don't you have a naming convention in place? I never thought we'd run into duplicates either.
We do have a naming convention, but that office ran out of asset tags, so we had to stick with default names for now.
I started using a tool to automate device naming based on the service tag. I've set it up so duplicates shouldn't happen unless something goes wrong on the manufacturer's end.
We've had a similar situation in our environment, where out of a possible 10,000 hostname combinations, we still ended up with duplicates. To minimize the risk, we updated our suffix to use 5 digits instead of 4, which really helps avoid any name conflicts. Just something to consider for your setup!
But even then, there can be collisions with six digits! It’s all about probability; you wouldn’t believe how likely duplicates can pop up with more devices.
It's a classic case of the birthday paradox! There’s a surprising chance of duplicates after generating a few hundred names.
This is why I prefer using serial numbers to automatically generate device names. It's a much safer method!

Exactly, randomness doesn't guarantee unique results every time. You can definitely hit the same value now and then!