From 76546bcffd3d7f8ba08d442e271142e9817f8548 Mon Sep 17 00:00:00 2001 From: Logan Carlile <60319673+logancarlile97@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:44:45 -0400 Subject: [PATCH] Added support for custom computer models If a computer manufacturer does not match one of the predefined 10, the Invoke-CMApplyDriverPackage script will fail, even if a custom driver package has been created using the driver automation tool. This default clause will allow custom driver packages to be installed while still allowing for specific handling of different computer manufacturers. --- Invoke-CMApplyDriverPackage.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Invoke-CMApplyDriverPackage.ps1 b/Invoke-CMApplyDriverPackage.ps1 index 14bbf21..2d68ca7 100644 --- a/Invoke-CMApplyDriverPackage.ps1 +++ b/Invoke-CMApplyDriverPackage.ps1 @@ -1186,6 +1186,11 @@ Process { $ComputerDetails.Model = (Get-WmiObject -Class "Win32_ComputerSystem" | Select-Object -ExpandProperty Model).Trim() $ComputerDetails.SystemSKU = (Get-CIMInstance -ClassName "MS_SystemInformation" -NameSpace root\WMI).BaseBoardProduct.Trim() } + default { + $ComputerDetails.Manufacturer = $ComputerManufacturer + $ComputerDetails.Model = (Get-WmiObject -Class "Win32_ComputerSystem" | Select-Object -ExpandProperty Model).Trim() + $ComputerDetails.SystemSKU = (Get-CIMInstance -ClassName "MS_SystemInformation" -NameSpace root\WMI).BaseBoardProduct.Trim() + } } # Handle overriding computer details if debug mode and additional parameters was specified