Traditionally, IT pros spend a lot of time building and customizing images that will later be deployed to devices. Windows Autopilot introduces a new approach.
From the user's perspective, it only takes a few simple operations to make their device ready to use.
From the IT pro's perspective, the only interaction required from the end user is to connect to a network and to verify their credentials. Everything beyond that is automated.
One of the feature IT pros miss today (at the time of this post) is the standardization of the Computer Names when using Autopilot for Hybrid scenarios. The reason being the limited flexibility while creating the Domain Join configuration profile in Intune which is only allows a prefix followed by a random set of characters.
Product group is aware of this challenge and plans to make this more flexible in the near future.
As an interim measure, you can leverage on-premises solution like ConfigMgr to change the computer name.
An assumption to this workaround is you have already pushed the ConfigMgr agent on the target device. For guidance refer this post: https://blogs.technet.microsoft.com/arnabm/2018/10/14/deploy-ccmsetup-exe-via-intune/
In this post I am showcasing the power of ConfigMgr Task Sequence to change the computer name.
In this example I am using a PowerShell script to change the computer name to its serial number. This is one of the most common asks. There are many references you can find from the Scripting Gallery, for this specific post I am referencing: https://gallery.technet.microsoft.com/Computer-Rename-to-Serial-1f31b580
[reflection.assembly]::loadwithpartialname("microsoft.visualbasic")
$serial = Get-WmiObject win32_bios | select -expand serialnumber
$ready = $serial -replace " ", ""
$number = [Microsoft.VisualBasic.Information]::isnumeric($ready)
If ($number -eq $True) {
$name = "UMS" + $ready.substring(0, [System.Math]::Min(12, $ready.length))
}
Elseif ($number -eq $False) {
$name = $ready.substring(0, [System.Math]::Min(15, $ready.length))
}
(Get-WmiObject Win32_ComputerSystem).Rename($name)
The sample script provided here is not supported under any Microsoft standard support program or service. All scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
Your task sequence is now ready to be deployed to a Device Collection. To keep the things Dynamic, I created a dynamic Device Collection which is matching the Name-Prefix of my Hybrid Join Configuration Profile.
Once the device is renamed, AAD Connect will synchronize the new name in Azure AD and will be reflected in Intune and Azure portals.
There are many other ways to rename the computer without using ConfigMgr, I personally found this most secure without exposing any credentials.
Thanks,
Arnab Mitra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.