feat: Update TS Install DCU for Dell Inc. & Update Join Domain 3e octets

This commit is contained in:
2026-06-10 19:42:26 +02:00
parent ef7128111a
commit 50558560af
24 changed files with 484 additions and 264 deletions
+118
View File
@@ -0,0 +1,118 @@
# 📋 Script de Synchronisation vers C:\MDT
## 📝 Description
Ce script automatise la synchronisation des dossiers `Control` et `Scripts` du projet MDT vers `C:\MDT`.
**Fonctionnalités:**
- ✅ Détecte les fichiers modifiés via hash MD5
- ✅ Copie les fichiers manquants
- ✅ Crée automatiquement la structure de dossiers
- ✅ Mode DRY-RUN pour prévisualiser les changements
- ✅ Résumé détaillé des opérations
## 🚀 Utilisation
### Option 1: Interface Interactive (Recommandé)
Double-cliquez sur `Sync-ToMDT.bat` pour lancer l'interface de menu:
```
1. Mode DRY-RUN (afficher ce qui serait fait)
2. Synchroniser MAINTENANT (vrai changement)
3. Quitter
```
### Option 2: Direct PowerShell
**Mode DRY-RUN (test):**
```powershell
.\Sync-ToMDT.ps1 -DryRun
```
**Mode RÉEL (synchronisation):**
```powershell
.\Sync-ToMDT.ps1
```
**Avec chemins personnalisés:**
```powershell
.\Sync-ToMDT.ps1 -SourceBase "C:\Dev\Infra-LAB\projects\MDT" -DestinationBase "C:\MDT"
```
## 📊 Exemple de Sortie
```
╔════════════════════════════════════════════════════════╗
║ Script de Synchronisation vers C:\MDT ║
╚════════════════════════════════════════════════════════╝
Source: C:\Dev\Infra-LAB\projects\MDT
Destination: C:\MDT
=== Synchronisation du dossier: Control ===
[NOUVEAU] CustomSettings.ini
[MODIFIÉ] Settings.xml
[NOUVEAU] Medias.xml
Résumé - Control:
• Fichiers ajoutés: 2
• Fichiers mis à jour: 1
• Fichiers inchangés: 1
=== Synchronisation du dossier: Scripts ===
[NOUVEAU] BDD_Autorun.wsf
...
Résumé - Scripts:
• Fichiers ajoutés: 5
• Fichiers mis à jour: 3
• Fichiers inchangés: 42
╔════════════════════════════════════════════════════════╗
║ ✓ Synchronisation terminée avec succès ║
╚════════════════════════════════════════════════════════╝
```
## 🔍 Détails Technique
### Ce que le script fait:
1. Parcourt tous les fichiers des dossiers source `Control` et `Scripts`
2. Pour chaque fichier:
- S'il n'existe pas en destination → **COPIE**
- S'il existe mais est différent (hash MD5) → **MET À JOUR** 🔄
- S'il existe et est identique → **IGNORE** ⏭️
3. Crée automatiquement les dossiers nécessaires
4. Affiche un rapport détaillé
### Algorithme de comparaison:
- Utilise MD5 pour détecter les modifications
- Rapide et fiable pour les fichiers texte et binaires
- Ignore la date de modification (plus précis)
## ⚠️ Important
- **DRY-RUN mode**: Affiche ce qui serait fait SANS rien modifier
- **À toujours tester d'abord en DRY-RUN avant synchronisation réelle**
- Assurez-vous d'avoir les permissions d'accès sur C:\MDT
- Le script ne **supprime jamais** les fichiers en destination
## 📌 Cas d'usage
✓ Mise à jour automatique des configurations MDT
✓ Synchronisation après modification des fichiers source
✓ Automatisation avec Task Scheduler
✓ Intégration dans des scripts de déploiement
## 🛠️ Troubleshooting
### Erreur: "Le script n'a pas pu être chargé"
Exécutez en PowerShell:
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
```
### Erreur: "Accès refusé à C:\MDT"
- Vérifiez les permissions sur C:\MDT
- Exécutez PowerShell en administrateur (clic droit → "Exécuter en tant qu'administrateur")
### Le script va lentement
- Normal pour de grandes structures (centaines de fichiers)
- La vérification MD5 prend du temps, c'est l'échange qualité/vitesse
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env powershell
Write-Host "Test 1: Script lance"
$SourceBase = 'C:\Dev\Infra-LAB\projects\MDT'
$DestinationBase = 'C:\MDT'
$DryRun = $true
Write-Host "SourceBase: $SourceBase"
Write-Host "DestinationBase: $DestinationBase"
$controlSource = "$SourceBase\Control"
$scriptsSource = "$SourceBase\Scripts"
Write-Host "Verifying paths..."
Write-Host "Control source: $controlSource"
Write-Host "Control exists: $(Test-Path $controlSource)"
Write-Host "Scripts source: $scriptsSource"
Write-Host "Scripts exists: $(Test-Path $scriptsSource)"
if (Test-Path $controlSource) {
Write-Host "Control folder found!"
Get-ChildItem -Path $controlSource | Select-Object -First 5
}
if (Test-Path $scriptsSource) {
Write-Host "Scripts folder found!"
Get-ChildItem -Path $scriptsSource | Select-Object -First 5
}
+63
View File
@@ -0,0 +1,63 @@
@echo off
REM Script de lancement pour la synchronisation vers C:\MDT
REM Verifier si PowerShell est disponible
where powershell >nul 2>nul
if %errorlevel% neq 0 (
echo ERREUR: PowerShell n'est pas disponible
pause
exit /b 1
)
REM Obtenir le repertoire du script
set "ScriptDir=%~dp0"
set "PowerShellScript=%ScriptDir%Sync-ToMDT.ps1"
REM Verifier que le script existe
if not exist "%PowerShellScript%" (
echo ERREUR: Le script PowerShell n a pas ete trouve
echo Attendu: %PowerShellScript%
pause
exit /b 1
)
REM Afficher le menu
cls
echo ===============================================
echo Synchronisation vers C:\MDT
echo ===============================================
echo.
echo 1. Mode DRY-RUN (afficher ce qui serait fait)
echo 2. Synchroniser MAINTENANT (vrai changement)
echo 3. Quitter
echo.
set /p choice="Choisissez une option (1-3): "
if "%choice%"=="1" (
echo.
echo Mode DRY-RUN...
echo.
powershell -NoProfile -ExecutionPolicy Bypass -File "%PowerShellScript%" -DryRun
pause
) else if "%choice%"=="2" (
echo.
echo.
echo [!] ATTENTION: Vous allez effectuer une synchronisation REELLE
echo.
set /p confirm="Etes-vous sur? (O/N): "
if /i "%confirm%"=="O" (
echo.
powershell -NoProfile -ExecutionPolicy Bypass -File "%PowerShellScript%"
pause
) else (
echo Operation annulee
pause
)
) else if "%choice%"=="3" (
exit /b 0
) else (
echo Choix invalide
pause
exit /b 1
)
+165
View File
@@ -0,0 +1,165 @@
# Script de synchronisation vers C:\MDT
# Met a jour uniquement les fichiers modifies ou manquants
$ErrorActionPreference = "Continue"
param(
[string]$SourceBase = 'C:\Dev\Infra-LAB\projects\MDT',
[string]$DestinationBase = 'C:\MDT',
[switch]$DryRun = $false
)
# Couleurs pour l'affichage
$colors = @{
Success = "Green"
Error = "Red"
Warning = "Yellow"
Info = "Cyan"
Update = "Magenta"
}
function Write-ColorOutput {
param(
[string]$Message,
[string]$Color = "White"
)
Write-Host $Message -ForegroundColor $Color
}
function Sync-Folder {
param(
[string]$SourceFolder,
[string]$DestFolder
)
try {
# Extraire le nom du dossier a partir du chemin source
$FolderName = Split-Path -Leaf $SourceFolder
Write-ColorOutput "`n=== Synchronisation du dossier: $FolderName ===" -Color $colors.Info
# Verifier si le dossier source existe
if (-not (Test-Path $SourceFolder)) {
Write-ColorOutput "ERREUR: Le dossier source n existe pas: $SourceFolder" -Color $colors.Error
return $false
}
# Creer le dossier destination s il n existe pas
if (-not (Test-Path $DestFolder)) {
Write-ColorOutput "Creation du dossier de destination: $DestFolder" -Color $colors.Warning
if (-not $DryRun) {
New-Item -ItemType Directory -Path $DestFolder -Force | Out-Null
}
}
$filesUpdated = 0
$filesAdded = 0
$filesSkipped = 0
# Recuperer tous les fichiers du dossier source (recursivement)
$sourceFiles = @(Get-ChildItem -Path $SourceFolder -Recurse -File -ErrorAction Stop)
Write-ColorOutput "Fichiers detectes: $($sourceFiles.Count)" -Color $colors.Info
foreach ($sourceFile in $sourceFiles) {
# Calculer le chemin relatif
$relativePath = $sourceFile.FullName.Substring($SourceFolder.Length).TrimStart('\')
$destPath = Join-Path $DestFolder $relativePath
$destDir = Split-Path $destPath -Parent
# Creer le dossier de destination s il n existe pas
if (-not (Test-Path $destDir)) {
Write-ColorOutput " -> Creation du repertoire: $destDir" -Color $colors.Warning
if (-not $DryRun) {
New-Item -ItemType Directory -Path $destDir -Force | Out-Null
}
}
# Verifier si le fichier destination existe
if (-not (Test-Path $destPath)) {
# Fichier manquant - copier
Write-ColorOutput " [NOUVEAU] $relativePath" -Color $colors.Success
$filesAdded++
if (-not $DryRun) {
Copy-Item -Path $sourceFile.FullName -Destination $destPath -Force
}
} else {
# Fichier existe - comparer les hashes
$sourceHash = (Get-FileHash -Path $sourceFile.FullName -Algorithm MD5).Hash
$destHash = (Get-FileHash -Path $destPath -Algorithm MD5).Hash
if ($sourceHash -ne $destHash) {
# Fichier modifie - copier
Write-ColorOutput " [MODIFIE] $relativePath" -Color $colors.Update
$filesUpdated++
if (-not $DryRun) {
Copy-Item -Path $sourceFile.FullName -Destination $destPath -Force
}
} else {
# Fichier identique - ignorer
$filesSkipped++
}
}
}
Write-ColorOutput "`nResume - ${FolderName}:" -Color $colors.Info
Write-ColorOutput " [+] Fichiers ajoutes: $filesAdded" -Color $colors.Success
Write-ColorOutput " [~] Fichiers mis a jour: $filesUpdated" -Color $colors.Update
Write-ColorOutput " [=] Fichiers inchanges: $filesSkipped" -Color $colors.Info
return $true
}
catch {
Write-ColorOutput "ERREUR CRITIQUE dans Sync-Folder: $_" -Color $colors.Error
Write-ColorOutput "Source: $SourceFolder" -Color $colors.Error
Write-ColorOutput "Destination: $DestFolder" -Color $colors.Error
return $false
}
}
function Main {
Write-ColorOutput "================================================" -Color $colors.Info
Write-ColorOutput "Script de Synchronisation vers C:\MDT" -Color $colors.Info
Write-ColorOutput "================================================" -Color $colors.Info
if ($DryRun) {
Write-ColorOutput "`n[!] MODE DRY-RUN ACTIVE - pas de modification reelle" -Color $colors.Warning
}
Write-ColorOutput "`nSource: $SourceBase" -Color $colors.Info
Write-ColorOutput "Destination: $DestinationBase" -Color $colors.Info
Write-ColorOutput "`nVerification des chemins:" -Color $colors.Info
$controlSource = "$SourceBase\Control"
$scriptsSource = "$SourceBase\Scripts"
$controlExists = Test-Path $controlSource
$scriptsExists = Test-Path $scriptsSource
Write-ColorOutput " Controle source: $controlSource (existe: $controlExists)" -Color $colors.Info
Write-ColorOutput " Scripts source: $scriptsSource (existe: $scriptsExists)" -Color $colors.Info
# Verifier si C:\MDT existe, sinon creer
if (-not (Test-Path $DestinationBase)) {
Write-ColorOutput "`nLe dossier C:\MDT n existe pas. Creation en cours..." -Color $colors.Warning
if (-not $DryRun) {
New-Item -ItemType Directory -Path $DestinationBase -Force | Out-Null
}
}
# Synchroniser les deux dossiers
$success = $true
Write-ColorOutput "`nDemarrage de la synchronisation..." -Color $colors.Info
$success = Sync-Folder -SourceFolder "$SourceBase\Control" -DestFolder "$DestinationBase\Control"
$success = Sync-Folder -SourceFolder "$SourceBase\Scripts" -DestFolder "$DestinationBase\Scripts"
Write-ColorOutput "`n================================================" -Color $colors.Info
if ($success) {
Write-ColorOutput "[OK] Synchronisation terminee avec succes" -Color $colors.Success
} else {
Write-ColorOutput "[ERROR] Synchronisation terminee avec erreurs" -Color $colors.Error
}
Write-ColorOutput "================================================" -Color $colors.Info
}
# Executer le script principal
Main
@@ -0,0 +1 @@
<groups><group guid="{00000000-0000-0000-0000-000000000000}" enable="True"><Name>default</Name><Comments>default folder (root)</Comments></group><group guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" enable="True"><Name>hidden</Name><Comments>This folder contains shared source items that have not been made explicitly visible in this deployment share.</Comments></group></groups>
+1
View File
@@ -0,0 +1 @@
<applications />
+86 -68
View File
@@ -657,20 +657,6 @@
</defaultVarList> </defaultVarList>
<action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action> <action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
</step> </step>
<step type="SMS_TaskSequence_SetVariableAction" name="OSDAdapter0Name" description="LAN_Peda" disable="true" continueOnError="true" successCodeList="0 3010">
<defaultVarList>
<variable name="VariableName" property="VariableName">OSDAdapter0Name</variable>
<variable name="VariableValue" property="VariableValue">LAN_Peda</variable>
</defaultVarList>
<action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
</step>
<step type="SMS_TaskSequence_SetVariableAction" name="OSDAdapter1Name" description="LAN_Peda" disable="true" continueOnError="true" successCodeList="0 3010">
<defaultVarList>
<variable name="VariableName" property="VariableName">OSDAdapter1Name</variable>
<variable name="VariableValue" property="VariableValue">LAN_Peda</variable>
</defaultVarList>
<action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
</step>
<step type="SMS_TaskSequence_ApplyNetworkSettingsAction" name="New Name NIC" description="" disable="false" continueOnError="true" runIn="WinPEandFullOS" successCodeList="0 3010"> <step type="SMS_TaskSequence_ApplyNetworkSettingsAction" name="New Name NIC" description="" disable="false" continueOnError="true" runIn="WinPEandFullOS" successCodeList="0 3010">
<defaultVarList> <defaultVarList>
<variable name="OSDAdapterCount" property="NumAdapters">1</variable> <variable name="OSDAdapterCount" property="NumAdapters">1</variable>
@@ -744,14 +730,14 @@
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="LoadProfile" property="LoadProfile">false</variable>
</defaultVarList> </defaultVarList>
</step> </step>
<group expand="true" name="Dell Pro Slim QSC1250" description="Collège Baudelaire Dotation Mai 2026" disable="false" continueOnError="false"> <group expand="true" name="Dell Pro Slim QCS1250" description="Collège Baudelaire Dotation Mai 2026" disable="false" continueOnError="false">
<action /> <action />
<condition> <condition>
<operator type="and"> <operator type="and">
<expression type="SMS_TaskSequence_VariableConditionExpression"> <expression type="SMS_TaskSequence_VariableConditionExpression">
<variable name="Variable">%model%</variable> <variable name="Variable">Make</variable>
<variable name="Operator">equals</variable> <variable name="Operator">equals</variable>
<variable name="Value">Dell Pro Slim QSC1250</variable> <variable name="Value">Dell Inc.</variable>
</expression> </expression>
</operator> </operator>
</condition> </condition>
@@ -763,54 +749,86 @@
</defaultVarList> </defaultVarList>
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action> <action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
</step> </step>
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /scan" description="On scan les péripériques avant de mettre à jour" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS"> <group expand="true" name="BIOS and Firmware" description="" disable="false" continueOnError="false">
<defaultVarList> <action />
<variable name="PackageID" property="PackageID"></variable> <step type="SMS_TaskSequence_RunCommandLineAction" name="DCU Scan for BIOS and Firmware Updates" description="On scan les péripériques avant de mettre à jour" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
<variable name="RunAsUser" property="RunAsUser">false</variable> <defaultVarList>
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable> <variable name="PackageID" property="PackageID"></variable>
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable> <variable name="RunAsUser" property="RunAsUser">false</variable>
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
</defaultVarList> <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /scan</action> <variable name="LoadProfile" property="LoadProfile">false</variable>
</step> </defaultVarList>
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /applyUpdates" description="On installe les drivers" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS"> <action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /scan -updateType=bios,firmware</action>
<defaultVarList> </step>
<variable name="PackageID" property="PackageID" /> <step type="SMS_TaskSequence_RunCommandLineAction" name="DCU Install BIOS and Firmware Updates" description="On installe les drivers" disable="false" continueOnError="true" startIn="" successCodeList="0 1 500 3010" runIn="WinPEandFullOS">
<variable name="RunAsUser" property="RunAsUser">false</variable> <defaultVarList>
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable> <variable name="PackageID" property="PackageID" />
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable> <variable name="RunAsUser" property="RunAsUser">false</variable>
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
</defaultVarList> <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /applyUpdates -reboot=disable -autoSuspendBitLocker=enable</action> <variable name="LoadProfile" property="LoadProfile">false</variable>
</step> </defaultVarList>
<step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010"> <action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /applyUpdates -reboot=disable -autoSuspendBitLocker=enable</action>
<defaultVarList> </step>
<variable name="SMSRebootMessage" property="Message"></variable> <step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
<variable name="SMSRebootTimeout" property="MessageTimeout">60</variable> <defaultVarList>
<variable name="SMSRebootTarget" property="Target"></variable> <variable name="SMSRebootMessage" property="Message"></variable>
</defaultVarList> <variable name="SMSRebootTimeout" property="MessageTimeout">60</variable>
<action>smsboot.exe /target:WinPE</action> <variable name="SMSRebootTarget" property="Target"></variable>
</step> </defaultVarList>
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /scan" description="On scan à nouveau" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS"> <action>smsboot.exe /target:WinPE</action>
<defaultVarList> </step>
<variable name="PackageID" property="PackageID" /> <condition>
<variable name="RunAsUser" property="RunAsUser">false</variable> <operator type="and">
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable> <expression type="SMS_TaskSequence_VariableConditionExpression">
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable> <variable name="Variable">_SMSTSLastActionRetCode</variable>
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="Operator">notEquals</variable>
</defaultVarList> <variable name="Value">500</variable>
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /scan</action> </expression>
</step> </operator>
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /applyUpdates" description="On installe les derniers drivers disponibles" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS"> </condition>
<defaultVarList> </group>
<variable name="PackageID" property="PackageID" /> <group expand="true" name="Drivers and Applications" description="" disable="false" continueOnError="false">
<variable name="RunAsUser" property="RunAsUser">false</variable> <step type="SMS_TaskSequence_RunCommandLineAction" name="DCU Scan for Driver and Application Updates" description="On scan à nouveau" disable="false" continueOnError="false" startIn="" successCodeList="0 1 500 3010" runIn="WinPEandFullOS">
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable> <defaultVarList>
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable> <variable name="PackageID" property="PackageID" />
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="RunAsUser" property="RunAsUser">false</variable>
</defaultVarList> <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /applyUpdates</action> <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
</step> <variable name="LoadProfile" property="LoadProfile">false</variable>
</defaultVarList>
<action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /scan -updateType=driver,application</action>
</step>
<action />
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU Install Driver and Application Updates" description="On installe les derniers drivers disponibles" disable="false" continueOnError="true" startIn="" successCodeList="0 1 500 3010" runIn="WinPEandFullOS">
<defaultVarList>
<variable name="PackageID" property="PackageID" />
<variable name="RunAsUser" property="RunAsUser">false</variable>
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
<variable name="LoadProfile" property="LoadProfile">false</variable>
</defaultVarList>
<action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /applyUpdates -reboot=disable -updateType=driver,application</action>
</step>
<step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
<defaultVarList>
<variable name="SMSRebootMessage" property="Message"></variable>
<variable name="SMSRebootTimeout" property="MessageTimeout">60</variable>
<variable name="SMSRebootTarget" property="Target"></variable>
</defaultVarList>
<action>smsboot.exe /target:WinPE</action>
</step>
<condition>
<operator type="and">
<expression type="SMS_TaskSequence_VariableConditionExpression">
<variable name="Variable">_SMSTSLastActionRetCode</variable>
<variable name="Operator">notEquals</variable>
<variable name="Value">500</variable>
</expression>
</operator>
</condition>
</group>
</group> </group>
<step type="BDD_RecoverDomainJoin" name="Recover From Domain " description="" disable="true" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010"> <step type="BDD_RecoverDomainJoin" name="Recover From Domain " description="" disable="true" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
<defaultVarList> <defaultVarList>
@@ -854,8 +872,8 @@
</step> </step>
<step type="BDD_RunPowerShellAction" name="Install Winget + Logiciels de base" description="7-Zip 26.01&#xD;&#xA;Audacity 3.7.7&#xD;&#xA;Google Chrome 149.0.7827.54&#xD;&#xA;LibreOffice 26.2.3.2&#xD;&#xA;Microsoft Edge 148.0.3967.96&#xD;&#xA;Notepad++ 8.9.6.4&#xD;&#xA;Python 3.14.5&#xD;&#xA;SumatraPDF 3.6.1&#xD;&#xA;VLC media player 3.0.23&#xD;&#xA;Xmind 26.3.4129&#xD;&#xA;Dépendances présentes&#xD;&#xA;Microsoft Visual C++ 2015-2022 Redistributable (x64) 14.51.36231.0" disable="false" continueOnError="true" successCodeList="0 3010"> <step type="BDD_RunPowerShellAction" name="Install Winget + Logiciels de base" description="7-Zip 26.01&#xD;&#xA;Audacity 3.7.7&#xD;&#xA;Google Chrome 149.0.7827.54&#xD;&#xA;LibreOffice 26.2.3.2&#xD;&#xA;Microsoft Edge 148.0.3967.96&#xD;&#xA;Notepad++ 8.9.6.4&#xD;&#xA;Python 3.14.5&#xD;&#xA;SumatraPDF 3.6.1&#xD;&#xA;VLC media player 3.0.23&#xD;&#xA;Xmind 26.3.4129&#xD;&#xA;Dépendances présentes&#xD;&#xA;Microsoft Visual C++ 2015-2022 Redistributable (x64) 14.51.36231.0" disable="false" continueOnError="true" successCodeList="0 3010">
<defaultVarList> <defaultVarList>
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\Prepare-Winget.ps1</variable> <variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\WingetRepo$\Prepare-Winget.ps1</variable>
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1\</variable> <variable name="Parameters" property="Parameters">-path %SCRIPTROOT%WingetRepo$\</variable>
<variable name="PackageID" property="PackageID"></variable> <variable name="PackageID" property="PackageID"></variable>
</defaultVarList> </defaultVarList>
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action> <action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
@@ -946,7 +964,7 @@
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="LoadProfile" property="LoadProfile">false</variable>
</defaultVarList> </defaultVarList>
</step> </step>
<step name="Apply Local GPO Package" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010"> <step name="Apply Local GPO Package" description="" disable="true" continueOnError="false" startIn="" successCodeList="0 3010">
<action>cscript.exe "%SCRIPTROOT%\ZTIApplyGPOPack.wsf"</action> <action>cscript.exe "%SCRIPTROOT%\ZTIApplyGPOPack.wsf"</action>
<condition> <condition>
<expression type="SMS_TaskSequence_VariableConditionExpression"> <expression type="SMS_TaskSequence_VariableConditionExpression">
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<groups><group guid="{00000000-0000-0000-0000-000000000000}" enable="True"><Name>default</Name><Comments>default folder (root)</Comments><LastModifiedTime>07/05/2026 07:14:52</LastModifiedTime><LastModifiedBy>LEN-T470-AH\ahamez</LastModifiedBy><Member>{39b4a76b-3a4f-4498-906f-0e1f0794acef}</Member></group><group guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" enable="True"><Name>hidden</Name><Comments>This folder contains shared source items that have not been made explicitly visible in this deployment share.</Comments></group></groups>
@@ -0,0 +1 @@
<linkedDeploymentShares><linkedDeploymentShare guid="{39b4a76b-3a4f-4498-906f-0e1f0794acef}" enable="True"><Name>LINKED001</Name><Comments></Comments><CreatedTime>07/05/2026 07:14:52</CreatedTime><CreatedBy>LEN-T470-AH\ahamez</CreatedBy><LastModifiedTime>07/05/2026 11:55:29</LastModifiedTime><LastModifiedBy>LEN-T470-AH\ahamez</LastModifiedBy><Root>\\10.200.38.158\mdt$</Root><SelectionProfile>Drivers_WinPE_x64</SelectionProfile><Replace>False</Replace><CopyStandardFolders>False</CopyStandardFolders><UpdateBoot>False</UpdateBoot><SingleUser>False</SingleUser></linkedDeploymentShare></linkedDeploymentShares>
+1
View File
@@ -0,0 +1 @@
<groups><group guid="{00000000-0000-0000-0000-000000000000}" enable="True"><Name>default</Name><Comments>default folder (root)</Comments><LastModifiedTime>09/06/2026 11:38:42</LastModifiedTime><LastModifiedBy>LEN-T470-AH\ahamez</LastModifiedBy><Member>{674147b0-e382-41d6-aa6c-0e083111d89b}</Member></group><group guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" enable="True"><Name>hidden</Name><Comments>This folder contains shared source items that have not been made explicitly visible in this deployment share.</Comments></group></groups>
@@ -0,0 +1 @@
<groups><group guid="{00000000-0000-0000-0000-000000000000}" enable="True"><Name>default</Name><Comments>default folder (root)</Comments></group><group guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" enable="True"><Name>hidden</Name><Comments>This folder contains shared source items that have not been made explicitly visible in this deployment share.</Comments><LastModifiedTime>11/04/2026 14:08:38</LastModifiedTime><LastModifiedBy>LUFFY\Almeyric</LastModifiedBy></group><group guid="{0eccad77-ff2e-4c0d-9ebf-8fe8d87551b9}" enable="True"><Name>Windows_11</Name><CreatedTime>11/04/2026 13:12:36</CreatedTime><CreatedBy>LUFFY\Almeyric</CreatedBy><LastModifiedTime>11/04/2026 14:08:38</LastModifiedTime><LastModifiedBy>LUFFY\Almeyric</LastModifiedBy><Member>{98319665-0004-4286-b1fc-b120534d8125}</Member><Member>{38541111-9007-45cd-aa18-98bbfbc77e03}</Member><Member>{ba8b38c1-9b17-44a3-b8bf-f05ed69363a3}</Member><Member>{9ac7e41f-9692-4ffa-b5c4-ca5d453ab328}</Member><Member>{4c947da3-6698-4848-9444-f9bafa9f9d0d}</Member><Member>{83cb770d-be41-49ab-9323-13d920fe482b}</Member><Member>{dedaea2f-a80c-4b48-b5f4-ca31387a257e}</Member><Member>{5c18819a-fc61-47d0-9f98-bc91e45d51e6}</Member><Member>{87816675-aeb2-4f87-8b1e-2a53e0bf6fbd}</Member><Member>{18bb36e0-981b-40e1-9ecf-a2b613f4f1d9}</Member></group></groups>
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
<groups><group guid="{00000000-0000-0000-0000-000000000000}" enable="True"><Name>default</Name><Comments>default folder (root)</Comments></group><group guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" enable="True"><Name>hidden</Name><Comments>This folder contains shared source items that have not been made explicitly visible in this deployment share.</Comments></group></groups>
+1
View File
@@ -0,0 +1 @@
<packages />
@@ -0,0 +1 @@
<selectionProfilegroups><group guid="{00000000-0000-0000-0000-000000000000}" enable="True"><Name>default</Name><Comments>default folder (root)</Comments><LastModifiedTime>06/05/2026 14:55:24</LastModifiedTime><LastModifiedBy>S0592850C-MDT\Administrateur</LastModifiedBy><Member>{f8ab0b9d-9bab-4b7c-983f-4ca2c471716c}</Member><Member>{4fedadad-4037-4571-b5d4-5fe2c44b3a4f}</Member><Member>{1b67317f-f70d-49d9-9eec-b7b6a22cda8b}</Member><Member>{88e2de35-1871-488c-ba98-634fdaef0583}</Member><Member>{69247ae9-9c3a-4a84-9cc6-3d29ab2c27c6}</Member><Member>{12e3dc5b-e022-4a5d-8a8e-401e9299ae70}</Member><Member>{8047f023-52c9-4d9b-a706-7b41738ddd79}</Member><Member>{2acd40fb-da85-442a-9426-6a9dcc184929}</Member><Member>{2f10d4c5-010a-4120-9fba-c36ecdfb5b15}</Member><Member>{43f552ca-a90a-4973-9110-08a2a3c6484d}</Member><Member>{245a109f-5d62-4f74-beff-19b22fcfe171}</Member><Member>{edae53ab-3da0-4a4b-8e18-61f517f9bfc5}</Member><Member>{4629a057-1bd1-4ea0-8002-fccf5d1c5977}</Member><Member>{c668c6e5-30ba-43f4-b4c0-a4c8f5c1fe8f}</Member><Member>{c992deb2-3ced-46fe-8bdd-e4a299ece2ff}</Member><Member>{b4248074-49b2-4216-86a1-26ea5377a3a4}</Member><Member>{4d5b0aa7-97b7-437a-9f0a-6d58e8a5441b}</Member><Member>{f1fc2690-9f5e-4326-aaeb-8b1e99159acf}</Member><Member>{117e9946-7c8f-4fd3-a149-02f4adada31d}</Member><Member>{551150f4-ce2b-4d0b-a314-9cbe3d2ebeb9}</Member><Member>{445afd8a-a3b4-4eb8-967a-9d7901373c09}</Member><Member>{e1e5538f-ab19-4629-84e3-40d263b28417}</Member><Member>{72fdffee-98ac-45ba-8711-a613d2a32647}</Member><Member>{2500b1cd-1074-4929-bce9-f5b275ef1596}</Member><Member>{95b2bb23-7cf1-4782-a099-e506f198f369}</Member><Member>{ad4d1bec-cb76-4e72-824a-ec004e31099b}</Member><Member>{9b84256c-333b-4d7c-b17c-afb6b5801a6f}</Member><Member>{0f0450fe-0f2a-4121-82f9-b7927d716e44}</Member><Member>{5dcd8f05-09d7-4bb6-8e83-3a0171f03df2}</Member><Member>{b04f40a9-10ae-416f-8703-49982b920d88}</Member><Member>{c9c4597b-9fd3-44c9-aecd-9e2d47c9dbb9}</Member><Member>{47eb9dde-e6eb-4f4a-8230-96631db46c85}</Member><Member>{d966bb01-b5e3-4781-bbcb-be8e9741a403}</Member><Member>{f14cd54a-53eb-43d4-82b9-1c116fb2e1e8}</Member><Member>{aba4d51f-3cab-47f4-bb02-5feeda71bc3e}</Member><Member>{38195fec-36a3-4cf1-b65f-c23bc5bf01b6}</Member><Member>{cf8c25a3-00a7-49ee-978f-c9e5eee0437f}</Member><Member>{af949e5f-b546-4724-b8af-ad1af63e4e7a}</Member><Member>{92db7c24-370e-42fd-8dfc-d363c1a806da}</Member><Member>{ff3348c9-17b3-4c65-954b-ce5e1f7a0530}</Member><Member>{e85e1c61-7107-44db-9a69-794fd3fc7443}</Member><Member>{7becce75-e11b-42d7-bd63-e74a8e13973a}</Member><Member>{5e92938a-1042-4bd6-a01a-8d398752b33f}</Member><Member>{c3a4a381-04c4-470c-ba2e-9428f3280f0a}</Member><Member>{7c37871c-cf86-4d48-afdb-1cc93a7750f1}</Member><Member>{84344712-38e8-4f84-9c3d-79e68ce7b7eb}</Member><Member>{b4486e74-42ae-49db-a96c-de219a1c0a93}</Member><Member>{c6e16269-cf47-4897-a82d-490634910436}</Member><Member>{9fc6719b-edd0-4a80-a70f-e5529514f491}</Member><Member>{69666434-a0c0-431f-be0f-63dc735c98d9}</Member><Member>{6f6c7982-72f2-4dcd-8fc1-905c9b8421a5}</Member><Member>{ea6bde99-39f3-4289-8f13-2b22c7d6d725}</Member><Member>{6f561028-f3cc-4e04-8cc2-9197df75a3b6}</Member><Member>{0250f34a-405b-4eb9-bab0-db7eef944122}</Member><Member>{1e9931b0-5dd0-457f-aa8c-d2f50d5d60b6}</Member><Member>{77711bd8-7bf7-4e18-9cfd-6e9b4590d016}</Member><Member>{ef894f9a-5217-432d-a4f4-fa17970af76e}</Member><Member>{f566396e-03cd-4379-9a7a-9bc3c07d5686}</Member><Member>{91fd7f63-283c-4832-9a1d-2c6f3db7e3e4}</Member><Member>{f9925bf1-76f7-4911-810f-6d6ddab71378}</Member><Member>{82d43f65-5fbe-4dd0-a5c6-c4a70bdafa67}</Member><Member>{9ee0a3f0-47fd-46f3-8795-e531bcb93abe}</Member><Member>{80e39bc0-5933-485d-b384-606e72837b4b}</Member><Member>{f3bf1705-90d3-40f1-bc16-44f2861b6336}</Member><Member>{4ff39fb4-57b5-4996-ab55-d66ab5d02abe}</Member><Member>{ef457e41-cec2-4f46-8ea3-12306f1f6931}</Member><Member>{9a0b1e9e-4de8-49bf-a5f6-bd5bdbc8d0bc}</Member><Member>{b06fb6fd-d863-4ca7-8d3b-0d9939af643c}</Member><Member>{197abbfe-13b8-46e8-9a4f-a8e9e6e62769}</Member><Member>{9a962717-10b9-4473-b161-525c0f61820f}</Member><Member>{7e1b5893-eb16-4d0b-a010-9d9e3b9acd90}</Member><Member>{ca0a1d3c-9d29-47be-b521-ff92c5dd9bff}</Member><Member>{976bdbe1-a594-4805-8476-2580fbdf6050}</Member><Member>{1e81ba78-bebd-4e54-bbbd-4363aae96e8e}</Member><Member>{3b87c02f-e027-497a-9c09-29c0374db5ce}</Member><Member>{2247abd2-1efb-4d6a-a413-901d0c5c5d34}</Member></group><group guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" enable="True"><Name>hidden</Name><Comments>This folder contains shared source items that have not been made explicitly visible in this deployment share.</Comments></group></selectionProfilegroups>
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<groups><group guid="{00000000-0000-0000-0000-000000000000}" enable="True"><Name>default</Name><Comments>default folder (root)</Comments></group><group guid="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" enable="True"><Name>hidden</Name><Comments>This folder contains shared source items that have not been made explicitly visible in this deployment share.</Comments></group><group guid="{6a6ecdd2-bc93-4fd6-91a4-0376c9fdc65b}" enable="True"><Name>Windows 11 x64</Name><CreatedTime>11/04/2026 10:35:45</CreatedTime><CreatedBy>LUFFY\Almeyric</CreatedBy><LastModifiedTime>11/04/2026 14:08:38</LastModifiedTime><LastModifiedBy>LUFFY\Almeyric</LastModifiedBy></group><group guid="{d13aa1d3-3978-47ef-9523-28a72773577e}" enable="True"><Name>Windows 11 x64\V25H2</Name><CreatedTime>11/04/2026 10:35:52</CreatedTime><CreatedBy>LUFFY\Almeyric</CreatedBy><LastModifiedTime>11/04/2026 14:08:38</LastModifiedTime><LastModifiedBy>LUFFY\Almeyric</LastModifiedBy><Member>{f2d6be08-5959-40f3-bbe7-23e753e0eb4b}</Member></group></groups>
+1
View File
@@ -0,0 +1 @@
<tss><ts guid="{f2d6be08-5959-40f3-bbe7-23e753e0eb4b}" hide="" enable="True"><Name>Windows11 - 25H2 - X64 - Lenovo HDF</Name><Comments>GEN 3 à Gen 5</Comments><CreatedTime>11/04/2026 14:08:38</CreatedTime><CreatedBy>LUFFY\Almeyric</CreatedBy><LastModifiedTime>11/04/2026 14:08:38</LastModifiedTime><LastModifiedBy>LUFFY\Almeyric</LastModifiedBy><DisplayName></DisplayName><ID>DEPL-W11-25H2-00</ID><Version>1.0</Version><TaskSequenceTemplate>Client.xml</TaskSequenceTemplate></ts></tss>
+1
View File
@@ -0,0 +1 @@
<version>6.3.8456.1000</version>
@@ -330,7 +330,7 @@ foreach ($addr in $netConfigs) {
Write-LogMessage "Impossible de parser le 3eme octet de $ipv4" -Type "WARNING" Write-LogMessage "Impossible de parser le 3eme octet de $ipv4" -Type "WARNING"
continue continue
} }
if ($thirdOctet -ge 1 -and $thirdOctet -le 254) { if ($thirdOctet -ge 0 -and $thirdOctet -le 254) {
Write-LogMessage "IP $ipv4 est dans les plages autorisees (3eme octet = $thirdOctet). Verification statut domaine..." -Type "INFO" Write-LogMessage "IP $ipv4 est dans les plages autorisees (3eme octet = $thirdOctet). Verification statut domaine..." -Type "INFO"
$isDomain = $false $isDomain = $false
try { try {
@@ -1,12 +0,0 @@
powershell -noprofile -command "Set-ExecutionPolicy bypass LocalMachine"
#Write-host "Operating system is $OSversion"
$kmshost = '10.0.14.20'
Write-Host "Le serveur KSM est defini sur $kmshost"
#Write-host "KMS client key is $Key"
sleep -Seconds 2
Write-host 'Forcing activation using slmgr script...'
cscript $env:windir\System32\slmgr.vbs /skms $kmshost 2>&1
#cscript $env:windir\System32\slmgr.vbs /ipk $key 2>&1
cscript $env:windir\System32\slmgr.vbs /ato 2>&1
break
@@ -1,183 +0,0 @@
<#
Installation Chocolatey + logiciels
Optimisé MDT USB / Windows 11 25H2
Gestion timeout + retry
#>
#region CONFIGURATION
$LogFile = "C:\Windows\Temp\choco_install.log"
$GlobalTimeoutMinutes = 180
$PackageTimeoutSeconds = 2700
$RetryCount = 2
$Packages = @(
"chocolatey-core.extension",
"chocolatey-compatibility.extension",
"chocolatey-windowsupdate.extension",
"7zip.install",
"googlechrome",
"firefoxesr",
"microsoft-edge",
"notepadplusplus.install",
"vlc.install",
"foxitreader",
"libreoffice-fresh",
"vcredist140"
)
#endregion
#region LOGGING
function Write-Log {
param ([string]$Message)
$Time = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
$Entry = "$Time - $Message"
Write-Output $Entry
Add-Content $LogFile $Entry
}
#endregion
#region GLOBAL TIMER
$ScriptStartTime = Get-Date
function Test-GlobalTimeout {
$Elapsed = (Get-Date) - $ScriptStartTime
if ($Elapsed.TotalMinutes -gt $GlobalTimeoutMinutes) {
Write-Log "GLOBAL TIMEOUT atteint"
exit 1
}
}
#endregion
#region PREREQUIS
Write-Log "Verification prerequis"
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072
#endregion
#region INSTALL CHOCOLATEY
if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
Write-Log "Installation Chocolatey"
Invoke-Expression (
(New-Object System.Net.WebClient).DownloadString(
"https://community.chocolatey.org/install.ps1"
)
)
refreshenv
}
else {
Write-Log "Chocolatey deja installe"
}
choco feature enable -n allowGlobalConfirmation
#endregion
#region INSTALL FUNCTION WITH TIMEOUT
function Install-PackageWithTimeout {
param (
[string]$PackageName
)
for ($i = 1; $i -le $RetryCount; $i++) {
Test-GlobalTimeout
Write-Log "Installation $PackageName tentative $i"
$Process = Start-Process `
choco `
-ArgumentList "install $PackageName -y --no-progress" `
-PassThru `
-WindowStyle Hidden
if ($Process.WaitForExit($PackageTimeoutSeconds * 1000)) {
if ($Process.ExitCode -eq 0) {
Write-Log "Succes $PackageName"
return
}
else {
Write-Log "Erreur code $($Process.ExitCode)"
}
}
else {
Write-Log "Timeout $PackageName"
try {
$Process.Kill()
}
catch {}
}
Start-Sleep 10
}
Write-Log "Echec final $PackageName"
}
#endregion
#region INSTALLATION PACKAGES
foreach ($Package in $Packages) {
Install-PackageWithTimeout $Package
}
#endregion
#region UPGRADE FINAL
Write-Log "Upgrade global"
choco upgrade all -y --no-progress
#endregion
Write-Log "Script termine"
exit 0