(Cours/TP) Masterisation WDS/MDT
Cours et TP
Lien vers la présentation et les TP en PDF
Master autonome
(Windows 11) Fichiers de réponses "unattend" XML
Ce fichier devrait automatiser complètement l'installation de Windows 11 avec la création du compte administrateur local.
Utilisation pour un déploiement via une ISO :
- Enregistrez ce fichier sous le nom
autounattend.xml
. - Placez-le à la racine de votre ISO d'installation de Windows 11.
- Démarrez l'installation de Windows 11 à partir de cet ISO.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<!-- Le pass "windowsPE" s’exécute dans l’environnement Windows PE avant l’installation.
On configure ici le langage, le clavier, et le partitionnement du disque. -->
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE"
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">
<SetupUILanguage>
<UILanguage>fr-FR</UILanguage>
</SetupUILanguage>
<InputLocale>040c:0000040c</InputLocale>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UILanguageFallback>fr-FR</UILanguageFallback>
<UserLocale>fr-FR</UserLocale>
</component>
<component name="Microsoft-Windows-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">
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- Partition pour Windows RE Tools -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>300</Size>
</CreatePartition>
<!-- Partition Système (ESP) -->
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>EFI</Type>
<Size>500</Size>
</CreatePartition>
<!-- Partition MSR -->
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>MSR</Type>
<Size>128</Size>
</CreatePartition>
<!-- Partition Windows -->
<CreatePartition wcm:action="add">
<Order>4</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- Windows RE Tools partition -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>WINRE</Label>
<Format>NTFS</Format>
<TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
</ModifyPartition>
<!-- System partition (ESP) -->
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Label>System</Label>
<Format>FAT32</Format>
</ModifyPartition>
<!-- MSR partition (pas de modification nécessaire) -->
<ModifyPartition wcm:action="add">
<Order>3</Order>
<PartitionID>3</PartitionID>
</ModifyPartition>
<!-- Windows partition -->
<ModifyPartition wcm:action="add">
<Order>4</Order>
<PartitionID>4</PartitionID>
<Label>OS</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>4</PartitionID>
</InstallTo>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<!-- Clé générique VL pour Windows 10/11 Pro) -->
<Key>W269N-WFGWX-YVC9B-4J6C9-T83GX</Key>
<WillShowUI>Never</WillShowUI>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>sysadmin.local</FullName>
<Organization>Ma boite</Organization>
</UserData>
</component>
</settings>
<!-- Le pass "offlineServicing" s’exécute après l’application de l’image mais avant le premier démarrage.
On peut y appliquer des mises à jour, pilotes, etc. -->
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings"
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">
<EnableLUA>false</EnableLUA>
</component>
</settings>
<!-- Le pass "generalize" s’exécute lors de la généralisation de l’image, afin de supprimer
les informations spécifiques à la machine (SID, pilotes, etc.). -->
<settings pass="generalize">
<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>1</SkipRearm>
</component>
</settings>
<!-- Le pass "specialize" s’exécute lors du premier démarrage après généralisation.
Il permet de configurer le nom de l’ordinateur, la clé produit, les paramètres régionaux, etc. -->
<settings pass="specialize">
<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>040c:0000040c</InputLocale>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UILanguageFallback>fr-FR</UILanguageFallback>
<UserLocale>fr-FR</UserLocale>
</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>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-SQMApi"
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">
<CEIPEnabled>0</CEIPEnabled>
</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">
<ComputerName>-PC</ComputerName>
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
</component>
</settings>
<!-- Le pass "oobeSystem" s’exécute durant l’OOBE (Out-Of-Box Experience) au premier démarrage
interactif. On y configure l’utilisateur final, les paramètres régionaux, les options de
première connexion, etc. -->
<settings pass="oobeSystem">
<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">
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>sysadmin.local</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Description></Description>
<DisplayName>sysadmin.local</DisplayName>
<Group>Administrators</Group>
<Name>sysadmin.local</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOrganization>Ma boite</RegisteredOrganization>
<RegisteredOwner>sysadmin.local</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<TimeZone>Romance Standard Time</TimeZone>
</component>
</settings>
</unattend>
Générateur de fichier unattend XML en ligne
- https://schneegans.de/windows/unattend-generator/
- https://windowsafg.com
Modification d'une ISO avec l'outil NTLite
NTLite est un outil pour personnaliser et optimiser les images ISO de Windows. Vous pouvez utiliser NTLite pour ajouter le fichier `autounattend.xml` à la racine de l'ISO de Windows 11.
Exemple détaillé avec NTLite :
1) Créez un répertoire qui contiendra les fichiers de votre image ISO (e.g. `C:\ISO`), copiez-y le contenu de l'ISO d'origine d'installation de Windows et placez le fichier `autounattend.xml` à la racine.
2) Téléchargez et installez NTLite depuis ntlite.com;
3) Ouvrez NTLite;
4) Cliquez sur `Ajouter` puis sélectionner `Répertoire de l'image` et ouvrez le répertoire créé auparavant;
5) Cliquez sur `Créer l'ISO`;
6) Choisissez un emplacement pour enregistrer la nouvelle ISO modifiée.
Utilisation de Rufus pour créer une clé USB bootable
1) Téléchargez et installez Rufus depuis rufus.ie;
2) Ouvrez Rufus;
3) Sélectionnez votre clé USB dans la liste déroulante `Périphérique`;
4) Cliquez sur `Sélectionner` et choisissez l'ISO;
5) Cliquez sur `Démarrer` pour créer la clé USB bootable.