We have a Windows Server 2022 Template that isn't applying the chosen customisation for changing the name or the VM, or adding it to the domain! It looks like this is possibly due to a delay in DHCP assigning an IP ?
I'd like to get this resolved but cant work out how unless we add a static IP in which case the result has more success, the alternative is some sort of SYSPREP ??
Did you ever get this solved?
I have similar issue but I have always used a script. But if I update a template to latest patches and hardware compat the IP parameters wil not get populated to the new VM..
$IP_Params = @{
IpMode = 'UseStaticIp'
IpAddress = $IPAddress
SubnetMask = $SubnetMask
DefaultGateway = $DefaultGateway
DNS = $DNS01,$DNS02
}
Get-OSCustomizationSpec $OSCusSpec | New-OSCustomizationSpec -Name $OSTempSpec -Type NonPersistent | Out-Null
Get-OSCustomizationSpec $OSTempSpec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping @ip_Params | Out-Null
We also have had this problem and as far as i see this also applies to Windows 11 Templates.
Edit: So here is how we solved our problem:
-> In case of the Win 11 template the packages to uninstall where three others but after removing them it also worked.
Just to add for Windows 11, I had to issue the following commands
Get-AppxPackage Microsoft.OneDriveSync | Remove-AppxPackage
Get-AppxPackage MicrosoftWindows.Client.WebExperience | Remove-AppxPackage
We do need to create new templates so I will keep this in mind, I have been so busy lately so forgot my thread was here!
Definitely seen this issue across a few Windows 10 and Server 2016 Upward templates!
I wonder if it's due to windows build changes as well as the sysprep weirdness