From 29105b9f9c9b57e4d53ea46c89f2d999470e87e5 Mon Sep 17 00:00:00 2001 From: Nodiaque <324425+nodiaque@users.noreply.github.com> Date: Fri, 11 Sep 2026 11:21:37 -0400 Subject: [PATCH] Update Invoke-CMApplyDriverPackage.ps1 Add path for the dism log. In BareMetal scenario, the dism log file get sent per default to x:\windows\temp\dism\dism.log which is lost since it's WinPE. New path send it to SMSTSLOGPATH instead. --- Invoke-CMApplyDriverPackage.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Invoke-CMApplyDriverPackage.ps1 b/Invoke-CMApplyDriverPackage.ps1 index 41b30cf..39bcc92 100644 --- a/Invoke-CMApplyDriverPackage.ps1 +++ b/Invoke-CMApplyDriverPackage.ps1 @@ -404,6 +404,7 @@ Process { ) # Determine log file location $LogFilePath = Join-Path -Path $LogsDirectory -ChildPath $FileName + $DISMLogPath = Join-Path -Path $LogsDirectory -ChildPath "dism.log" # Construct time stamp for log entry if (-not (Test-Path -Path 'variable:global:TimezoneBias')) { @@ -2518,7 +2519,7 @@ Process { foreach ($DriverINF in $DriverINFs) { # Install specific driver Write-CMLogEntry -Value " - Attempting to install driver: $($DriverINF.FullName)" -Severity 1 - $ApplyDriverInvocation = Invoke-Executable -FilePath "dism.exe" -Arguments "/Image:$($TSEnvironment.Value('OSDTargetSystemDrive'))\ /Add-Driver /Driver:`"$($DriverINF.FullName)`"" + $ApplyDriverInvocation = Invoke-Executable -FilePath "dism.exe" -Arguments "/Image:$($TSEnvironment.Value('OSDTargetSystemDrive'))\ /Add-Driver /Driver:`"$($DriverINF.FullName)`" /logpath:$DISMLogPath" # Validate driver injection if ($ApplyDriverInvocation -eq 0) {