feat: Update TS Install DCU for Dell Inc. Split & Gestion erreur environnement choco & Modification gestion erreur Join-Domain avec

This commit is contained in:
2026-06-11 18:41:36 +02:00
parent 50558560af
commit 075a2d0951
4 changed files with 42 additions and 11 deletions
+34 -6
View File
@@ -751,7 +751,7 @@
</step> </step>
<group expand="true" name="BIOS and Firmware" description="" disable="false" continueOnError="false"> <group expand="true" name="BIOS and Firmware" description="" disable="false" continueOnError="false">
<action /> <action />
<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"> <step type="SMS_TaskSequence_RunCommandLineAction" name="DCU - Scan for BIOS Updates" description="On scan les péripériques avant de mettre à jour" disable="false" continueOnError="true" startIn="" successCodeList="0 1 500 3010" runIn="WinPEandFullOS">
<defaultVarList> <defaultVarList>
<variable name="PackageID" property="PackageID"></variable> <variable name="PackageID" property="PackageID"></variable>
<variable name="RunAsUser" property="RunAsUser">false</variable> <variable name="RunAsUser" property="RunAsUser">false</variable>
@@ -759,9 +759,37 @@
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable> <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="LoadProfile" property="LoadProfile">false</variable>
</defaultVarList> </defaultVarList>
<action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /scan -updateType=bios,firmware</action> <action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /scan -updateType=bios</action>
</step> </step>
<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"> <step type="SMS_TaskSequence_RunCommandLineAction" name="DCU - Install BIOS Updates" description="On installe les drivers" 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 -autoSuspendBitLocker=enable</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>
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU - Scan for Firmware Updates" description="On scan les péripériques avant de mettre à jour" 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" /scan -updateType=firmware</action>
</step>
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU - Install Firmware Updates" description="On installe les drivers" disable="false" continueOnError="true" startIn="" successCodeList="0 1 500 3010" runIn="WinPEandFullOS">
<defaultVarList> <defaultVarList>
<variable name="PackageID" property="PackageID" /> <variable name="PackageID" property="PackageID" />
<variable name="RunAsUser" property="RunAsUser">false</variable> <variable name="RunAsUser" property="RunAsUser">false</variable>
@@ -790,7 +818,7 @@
</condition> </condition>
</group> </group>
<group expand="true" name="Drivers and Applications" description="" disable="false" continueOnError="false"> <group expand="true" name="Drivers and Applications" description="" disable="false" continueOnError="false">
<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"> <step type="SMS_TaskSequence_RunCommandLineAction" name="DCU - Scan for Driver and Application Updates" description="On scan à nouveau" disable="false" continueOnError="true" startIn="" successCodeList="0 1 500 3010" runIn="WinPEandFullOS">
<defaultVarList> <defaultVarList>
<variable name="PackageID" property="PackageID" /> <variable name="PackageID" property="PackageID" />
<variable name="RunAsUser" property="RunAsUser">false</variable> <variable name="RunAsUser" property="RunAsUser">false</variable>
@@ -798,10 +826,10 @@
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable> <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
<variable name="LoadProfile" property="LoadProfile">false</variable> <variable name="LoadProfile" property="LoadProfile">false</variable>
</defaultVarList> </defaultVarList>
<action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /scan -updateType=driver,application</action> <action>cmd /c "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" /scan -updateType=driver</action>
</step> </step>
<action /> <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"> <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> <defaultVarList>
<variable name="PackageID" property="PackageID" /> <variable name="PackageID" property="PackageID" />
<variable name="RunAsUser" property="RunAsUser">false</variable> <variable name="RunAsUser" property="RunAsUser">false</variable>
@@ -365,17 +365,18 @@ foreach ($addr in $netConfigs) {
try { try {
Write-LogMessage "Jointure du domaine EDU.HDF avec l'OU $Ou_site..." -Type "INFO" Write-LogMessage "Jointure du domaine EDU.HDF avec l'OU $Ou_site..." -Type "INFO"
Add-Computer -DomainName "edu.hdf" -Credential $cred_edu -OUPath $Ou -Force -ErrorAction Stop Add-Computer -DomainName "edu.hdf" -Credential $cred_edu -OUPath $Ou -Force -ErrorAction Stop
Write-LogMessage "SUCCESS : La machine a ete correctement ajoutee au domaine EDU.HDF !" -Type "INFO" Write-LogMessage "SUCCESS : La machine '$hostname' a ete correctement ajoutee au domaine EDU.HDF !" -Type "INFO"
Write-LogMessage "Serveur DC : $dc" -Type "INFO" Write-LogMessage "Serveur DC : $dc" -Type "INFO"
Write-LogMessage "Site : $Site" -Type "INFO" Write-LogMessage "Site : $Site" -Type "INFO"
Write-LogMessage "OU : $Ou" -Type "INFO" Write-LogMessage "OU : $Ou" -Type "INFO"
$joined = $true $joined = $true
break break
} catch { } catch {
Write-LogMessage "ERREUR lors de l'ajout au domaine (interface IP: $ipv4) : $_" -Type "ERROR" Write-LogMessage "ERREUR lors de l'ajout au domaine pour '$hostname' : $_" -Type "ERROR"
} }
} else { } else {
Write-LogMessage "Machine est deja membre du domaine EDU.HDF." -Type "INFO" Write-LogMessage "Machine '$hostname' est deja membre du domaine EDU.HDF." -Type "INFO"
Write-LogMessage "Aucune action requise." -Type "INFO"
$joined = $true $joined = $true
break break
} }
@@ -105,7 +105,8 @@ if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
) )
) )
refreshenv # Rafraîchir les variables d'environnement sans dépendre de Chocolatey
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
} }
else { else {
@@ -92,7 +92,8 @@ if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
) )
) )
refreshenv # Rafraîchir les variables d'environnement sans dépendre de Chocolatey
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
} }
else { else {