@george1421
Thanks for your test.
1- My xml is ok in C:\Windows\Panther\unattend.xml and C:\Windows\System32\sysprep\sysprep.xml
2- This is not script that rename the computer. This is sysprep.
After doing modificiations on my windows image i launch sysprep like this :
sysprep /generalize /oobe /shutdown /unattend:C:\Windows\System32\sysprep\sysprep.xml
And after cloning the computer i set correct name in the xml (with sed function of linux)
See my sysprep.xml after cloning (computer have name WIN-XXXX instead of UC0001):
<?xml version='1.0' encoding='utf-8'?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize" wasPassProcessed="true">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>false</CopyProfile>
<ComputerName>UC0001</ComputerName>
<RegisteredOrganization>My Organisation</RegisteredOrganization>
<RegisteredOwner>IT</RegisteredOwner>
<TimeZone>Romance Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ExtendOSPartition>
<Extend>true</Extend>
</ExtendOSPartition>
</component>
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Identification>
<Credentials>
<Domain>mydomain.local</Domain>
<Password>*SENSITIVE*DATA*DELETED*</Password>
<Username>*SENSITIVE*DATA*DELETED*</Username>
</Credentials>
<DebugJoin>true</DebugJoin>
<JoinDomain>mydomain.local</JoinDomain>
<MachineObjectOU>OU=XX,OU=XX,OU=XX,OU=XX,DC=mydomain,DC=local</MachineObjectOU>
</Identification>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>false</SkipAutoActivation>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DuplicatorDescription>IT</DuplicatorDescription>
</component>
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>0</SkipRearm>
</component>
</settings>
<settings pass="oobeSystem" wasPassProcessed="true">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>fr-fr</InputLocale>
<SystemLocale>fr-fr</SystemLocale>
<UILanguage>fr-fr</UILanguage>
<UILanguageFallback>fr-fr</UILanguageFallback>
<UserLocale>fr-fr</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<ProtectYourPC>1</ProtectYourPC>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
</OOBE>
<UserAccounts>
<AdministratorPassword>*SENSITIVE*DATA*DELETED* </AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>*SENSITIVE*DATA*DELETED*</Password>
<Name>*SENSITIVE*DATA*DELETED*</Name>
<Group>Administrateurs</Group>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/users/admin/desktop/install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi"> </cpi:offlineImage>
</unattend>

