maurice-daly / DriverAutomationTool

Home of the Driver Automation Tool
https://www.msendpointmgr.com
BSD 2-Clause "Simplified" License
381 stars 114 forks source link

Installation failed Drivers - Microsoft Surface_Laptop_5_for_Business_1950_1951 - Windows 10 x64 with Invoke-CMApplyDriverPackage.ps1 #457

Closed jcjol closed 1 year ago

jcjol commented 1 year ago

hello, During the construction of the surface the script CMApplyDriverPackage.ps1 is in error. the surface package was created by DriverAutomationTools, but the script crashes " - Amount of driver packages detected by validation process: 0" I attach the log. <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: BareMetal]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Microsoft]LOG]!> <![LOG[ - Computer model determined as: Surface Laptop 5]LOG]!> <![LOG[ - Computer SystemSKU determined as: Surface_Laptop_5_for_Business_1950:1951]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[[AdminService]: Starting AdminService endpoint phase]LOG]!> <![LOG[ - Detected that script was running within a task sequence in WinPE phase, automatically configuring AdminService endpoint type]LOG]!> <![LOG[ - Determined AdminService endpoint type as: Internal]LOG]!> <![LOG[ - Successfully read service account user name from TS environment variable 'MDMUserName': SrieCMe@aflcl]LOG]!> <![LOG[ - Successfully read service account password from TS environment variable 'MDMPassword': ****]LOG]!> <![LOG[ - Setting 'AdminServiceURL' variable to: https://SW100561.maif.local/AdminService/wmi]LOG]!> <![LOG[[AdminService]: Completed AdminService endpoint phase]LOG]!> <![LOG[[DriverPackage]: Starting driver package retrieval using method: AdminService]LOG]!> <![LOG[ - Querying AdminService for driver package instances]LOG]!> <![LOG[ - Calling AdminService endpoint with URI: https://SW100561.maif.local/AdminService/wmi/SMS_Package?$filter=contains(Name,'Drivers')]LOG]!> <![LOG[ - Retrieved a total of '35' driver packages from AdminService matching operational mode: Production]LOG]!> <![LOG[ - Target operating system name configured as: Windows 10]LOG]!> <![LOG[ - Target operating system architecture configured as: x64]LOG]!> <![LOG[ - Target operating system version configured as: 20H2]LOG]!> <![LOG[[DriverPackage]: Starting driver package matching phase]LOG]!> <![LOG[ - Initial count of driver packages before starting filtering process: 35]LOG]!> <![LOG[ - Filtering driver package results to detected computer manufacturer: Microsoft]LOG]!> <![LOG[ - Count of driver packages after filter processing: 4]LOG]!> <![LOG[ - Filtering driver package results to only include packages that have details added to the description field]LOG]!> <![LOG[ - Count of driver packages after filter processing: 4]LOG]!> <![LOG[[DriverPackage:M1600879]: Processing driver package with 3 detection methods: Drivers - Microsoft Surface_Pro_9_for_Business_2038 - Windows 10 x64]LOG]!> <![LOG[[DriverPackage:M1600871]: Processing driver package with 3 detection methods: Drivers - Microsoft Surface_Pro_9_With_5G_1996 - Windows 10 x64]LOG]!> <![LOG[[DriverPackage:M160087C]: Processing driver package with 3 detection methods: Drivers - Microsoft Surface_Laptop_5_for_Business_1950_1951 - Windows 10 x64]LOG]!> <![LOG[[DriverPackage:M160087B]: Processing driver package with 3 detection methods: Drivers - Microsoft Surface_Laptop_5_1950_1951 - Windows 10 x64]LOG]!> <![LOG[[DriverPackage]: Completed driver package matching phase]LOG]!> <![LOG[[DriverPackageValidation]: Starting driver package validation phase]LOG]!> <![LOG[ - Amount of driver packages detected by validation process: 0]LOG]!> <![LOG[ - Validation failed with empty list of matched driver packages, script execution will be terminated]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!>

jcjol commented 1 year ago

I found the problem. adding this part: "Microsoft" { $ComputerDetails.Manufacturer = "Microsoft" $ComputerDetails.Model = (Get-WmiObject -Class "Win32_ComputerSystem" | Select-Object -ExpandProperty Model).Trim() $ComputerDetails.SystemSKU = Get-WmiObject -Namespace "root\wmi" -Class "MSSystemInformation" | Select-Object -ExpandProperty SystemSKU if ($ComputerDetails.SystemSKU -match ":"){ $ComputerDetails.SystemSKU=$ComputerDetails.SystemSKU.replace(":","") } }

in the "Get-ComputerData" function and by modifying the package comment by putting "_" instead of ":" it matches and therefore downloads the package.