La machine va redémarrer avant de vous donner un accès OOBE.
Set-ExecutionPolicy unrestricted .\decrap.ps1 -ClearStart -onedrive Set-ExecutionPolicy restricted
netsh interface ipv6 6to4 set state disabled netsh interface teredo set state disabled
Installer le serveur fog en précisant l’adresse de votre serveur
Soit via le menu services ou via la commande
sc config FOGService start= disabled
mkdir %windir%\Setup\Scripts
cd %windir%\Setup\Scripts\ notepad SetupComplete.cmd
et y coller les commandes suivantes en n'oubliant pas d'adapter le nom de l'exécutable:
@echo off cd c:\drivers start /wait c:\drivers\SDI_x64_R1751.exe -autoinstall -autoclose -license timeout 15 sc config FOGService start= auto sc config FusionInventory-Agent start= auto timeout 15 rmdir /S /Q c:\drivers shutdown -t 60 -r
Nous sommes prêt avec notre image, nous pouvons la figer.
notepad c:\windows\system32\Sysprep\unattended.xml
et y mettre les lignes suivantes
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <!-- Autounattend_x64_BIOS_sample.xml This file automates the Windows installation. Before using this file: * Replace ProductKey with a product key for the edition of Windows you are installing (example: Windows 8 Pro) Note: The product key used in Microsoft-Windows-Setup\UserData\ProductKey\Key can be used many times in different installations and is not used to activate Windows. It is only used to choose which edition of Windows to install. The individual product key is either specified by the user, or by setting Microsoft-Windows-Shell-Setup\ProductKey. * Set the default language to your own: Replace "en-US" with your language code in Microsoft-Windows-International-Core-WinPE\SetupUILanguage. For a list of languages, see http://go.microsoft.com/fwlink/?LinkId=206620. * OEMs: Replace OEMInformation with your support information To use this file: Save this file on the root of a USB flash drive with the filename: Autounattend.xml Put the Windows DVD and the USB key into a new x64-BIOS PC. --> <settings pass="specialize"> <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>true</CopyProfile> </component> </settings> <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-BE</UILanguage> </SetupUILanguage> <InputLocale>fr-BE</InputLocale> <SystemLocale>fr-BE</SystemLocale> <UILanguage>fr-BE</UILanguage> <UserLocale>fr-BE</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"> <UserData> <AcceptEula>true</AcceptEula> </UserData> </component> </settings> <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"> <OOBE> <HideEULAPage>true</HideEULAPage> <HideLocalAccountScreen>true</HideLocalAccountScreen> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <SkipUserOOBE>true</SkipUserOOBE> <SkipMachineOOBE>true</SkipMachineOOBE> </OOBE> </component> </settings> </unattend>
Vous pouvez aussi générer un fichier actualisé sur le site https://www.windowsafg.com/win10x86_x64.html
C:\windows\system32\sysprep\Sysprep.exe /generalize /oobe /quit /unattend:c:\windows\system32\sysprep\unattended.xml