Computer Name Change

pmoit.request

New Member
Messages
3
Reaction score
0
Dear All,

Hope everyone is doing well.

I tried to search the forums, but I can't find a related case. Maybe I'm using the wrong search keywords.

So here is our case; under the unattended section we have an option to change Computer Name. See the attached screenshot.
Previously it was working fine; the last image we did was Windows 11 Enterprise 23H2 Build 22631.5192.

From the same Base ISO, we created an updated image with Build 22631.5771, but the Computer Name no longer applies the text before the %SERIAL%.
Instead of MOCA-SERIALNUMBER, the computer name is just SERIALNUMBER.

1757401593477.png

We updated NTLite to the latest version (2025.8.10552 64Bit) before creating the new image.
Not sure if this is a Windows thing or NTLite. The rest of the unattended options are fine except Computer Name.

Appreciate everyone's time.

Cheers,
 
I`ve seen this behaviour in my MDT. With Windows 10 it worked, since Windows 11 23H2 it didn`t. No explanation, sorry.
 
I`ve seen this behaviour in my MDT. With Windows 10 it worked, since Windows 11 23H2 it didn`t. No explanation, sorry.
Hmm... would you suggest that we load a PS1 script before logon and run the command to force change the computer name?

Below is sample script I tested that seems fine. One annoying thing is I need to restart the device to apply the new name, which is not a big problem since restarting the laptop it part of the onboarding processing before joining to domain anyways.

$NewCN = "MOCA-" + (Get-WmiObject -Class Win32_Bios).SerialNumber;
Rename-Computer -NewName $NewCN -Force;

Best,
 
With Powershell:

# Get serial number
$sn = (Get-CimInstance -ClassName Win32_Bios).SerialNumber

# Allow only valid characters (A-Z, 0-9, -)
$snClean = ($sn -replace '[^A-Za-z0-9-]', '')

# Shorten to max. 10 characters (so with prefix <= 15 characters)
$snShort = $snClean.Substring(0, [Math]::Min(10, $snClean.Length))

# Build new computer name
$NewCN = "MOCA-$snShort"

# Rename computer
Rename-Computer -NewName $NewCN -Force

# Reboot system to apply changes
Restart-Computer -Force
 
Update:
Downloaded a fresh Windows 11 24H2 (26100.1742.240906-0331) and loaded on the NTlite (2025.8.10552) Computer still not appending the text before the %SERIAL%.

Tried the same ISO on a lower NTLite 2025.1.10261 and the Computer Name is appending correctly the text before %SERIAL%.

Is this maybe an NTLite specific issue with 2025.8.10552? I Don't have other versions NTLite to try.
Just this old one installed on another machine.
 
Back
Top