leopold005
New Member
- Joined
- Nov 7, 2025
- Messages
- 2
- Thread Author
-
- #1
I'm in the process of building a handful of Windows 11 (24H2) VMs for my team at work to use for various support requirements, which will replace the bespoke mess of Windows 10 VMs we're currently using. The remit is to have a suite of applications installed, have them connected to the appropriate domain and they should be stateless. All pretty straightforward stuff, I thought, so I set about creating a gold ISO image to build a VM template from, then use the template to create the necessary VMs.
I've hit a few bumps in the road as I've gone along, but managed to fix them. I've reached the point where I've got a Sysprepped image that deploys very nicely, but it's not quite there as I need to perform a few last tasks to get it right - namely install antivirus, rename the machine and have it join a domain. I know that VSphere has the facility to do this, but it doesn't work on 24H2 and there's been scant information on making it work. No matter, I'm not too bad with PowerShell, so I've been looking at setupcomplete.cmd to get me over the line.
The problem now, is, once I add the cmd file to the appropriate location, the unattend.xml file that blasts through the OOBE nonsense doesn't run, and removing the cmd file doesn't restore the template to its previous working condition. Fortunately, I've been burned enough in the past to make sure I had a backup of the template, so it's costing me vast amounts of time, but it's a bit frustrating that it doesn't work. More frustrating has been the time spent trying to find an answer, and everything I've read suggests it should work.
The unattend.xml file I put together using WSIM and it works just fine. It sets the locale information, skips all the other screens and drops me at the desktop without me having to lift a finger:
The setupcomplete.cmd file contains only one command at this point: @echo off
When I add in that seemingly pointless cmd file, I'm greeted with the "select your region" screen, which is not what I want to have happen. I can only assume at this point that the unattend file is either failing or being ignored.
Has anyone else come across this before? And if so, is there a fix for it?
I've hit a few bumps in the road as I've gone along, but managed to fix them. I've reached the point where I've got a Sysprepped image that deploys very nicely, but it's not quite there as I need to perform a few last tasks to get it right - namely install antivirus, rename the machine and have it join a domain. I know that VSphere has the facility to do this, but it doesn't work on 24H2 and there's been scant information on making it work. No matter, I'm not too bad with PowerShell, so I've been looking at setupcomplete.cmd to get me over the line.
The problem now, is, once I add the cmd file to the appropriate location, the unattend.xml file that blasts through the OOBE nonsense doesn't run, and removing the cmd file doesn't restore the template to its previous working condition. Fortunately, I've been burned enough in the past to make sure I had a backup of the template, so it's costing me vast amounts of time, but it's a bit frustrating that it doesn't work. More frustrating has been the time spent trying to find an answer, and everything I've read suggests it should work.
The unattend.xml file I put together using WSIM and it works just fine. It sets the locale information, skips all the other screens and drops me at the desktop without me having to lift a finger:
XML:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="***redacted***" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>en-GB</InputLocale>
<SystemLocale>en-GB</SystemLocale>
<UILanguage>en-GB</UILanguage>
<UILanguageFallback>en-GB</UILanguageFallback>
<UserLocale>en-GB</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="***redacted***" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Password>
<Value>***redacted***</Value>
<PlainText>false</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Username>***redacted***</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<WindowsFeatures>
<ShowWindowsMediaPlayer>false</ShowWindowsMediaPlayer>
<ShowInternetExplorer>false</ShowInternetExplorer>
<ShowMediaCenter>false</ShowMediaCenter>
</WindowsFeatures>
<RegisteredOrganization>***redacted***</RegisteredOrganization>
<RegisteredOwner>***redacted***</RegisteredOwner>
<Display>
<HorizontalResolution>1440</HorizontalResolution>
<VerticalResolution>900</VerticalResolution>
</Display>
<Themes>
<DesktopBackground>C:\Windows\web\wallpaper\windows-black.jpg</DesktopBackground>
<ThemeName>***redacted***</ThemeName>
<WindowsSpotlight>false</WindowsSpotlight>
<DefaultThemesOff>true</DefaultThemesOff>
</Themes>
<DesktopOptimization>
<ShowWindowsStoreAppsOnTaskbar>false</ShowWindowsStoreAppsOnTaskbar>
<WindowsSpotlightTheme>false</WindowsSpotlightTheme>
</DesktopOptimization>
<UserAccounts>
<AdministratorPassword>
<Value>***redacted***</Value>
<PlainText>false</PlainText>
</AdministratorPassword>
</UserAccounts>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/test/install/sources/install.wim#Windows 11 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
The setupcomplete.cmd file contains only one command at this point: @echo off
When I add in that seemingly pointless cmd file, I'm greeted with the "select your region" screen, which is not what I want to have happen. I can only assume at this point that the unattend file is either failing or being ignored.
Has anyone else come across this before? And if so, is there a fix for it?