-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in script when collating info for $DriverPackageDetails PSObject #284
Comments
Temporary fix: Leave rest of script as is, at line 1143, replace the Microsoft switch section with the one below which includes override values for the affected models.
When creating the Custom Package using DAT, Model should match the override value ("Surface Laptop 5 13.5 Consumer" for example), BaseBoard matches the SystemSKU override value ("Surface_Laptop_5_1950") and that should be enough for it to make a match when the script runs during deployment. Also allows for deployment of Intel and AMD variants without them clashing. |
Hi,
I've found a bug in this section of script starting at line 1349
foreach ($DriverPackageItem in $DriverPackages) {
# Construct custom object to hold values for current driver package properties used for matching with current computer details
$DriverPackageDetails = [PSCustomObject]@{
PackageName = $DriverPackageItem.Name
PackageID = $DriverPackageItem.PackageID
PackageVersion = $DriverPackageItem.Version
DateCreated = $DriverPackageItem.SourceDate
Manufacturer = $DriverPackageItem.Manufacturer
Model = $null
SystemSKU = $DriverPackageItem.Description.Split(":").Replace("(", "").Replace(")", "")[1]
OSName = $null
OSVersion = $null
Architecture = $null
}
The SystemSKU line is not compatible with MS Surface Laptop 3/4/5's as they contain a ":" within the SKU, the Split cuts off the end of the SKU when reading the package Description, causing a failure to match (MS Surface SKU list for reference https://learn.microsoft.com/en-us/surface/surface-system-sku-reference)
For testing/verification:
The package has the following in the Description field - "(Models included:Surface_Laptop_4_1952:1953)" and the below is what is stored when the $DriverPackageDetails PSObject is constructed:
@{PackageName=Drivers - Microsoft Surface Laptop 4 - Windows 11 21H2 x64; PackageID=ZZZ00001; PackageVersion=24.014.43190.0; DateCreated=2024-05-28T13:06:15Z; Manufacturer=Microsoft; Model=; SystemSKU=Surface_Laptop_4_1952; OSName=; OSVersion=; Architecture=}
I bodged in a temporary fix by replacing the line with:
SystemSKU = $DriverPackageItem.Description.Replace("Models included:","").Replace("(", "").Replace(")", "")
which now successfully stores the correct SKU information.
but this then leads on to the second bug. Surface Laptop 3/4/5's come in Intel and AMD variants with their own driver packs. They are both "Surface Laptop X" for Model type, with the SKU the only differentiator. When running the script with both AMD and Intel driver packs in the environment (running a mix,) I get the below:
so I think the code may need to be updated to account for this possibility.
Hope the above helps,
Cheers
The text was updated successfully, but these errors were encountered: