Closed damon5334 closed 4 years ago
There is a bug. The comparator needs to be -eq in the script, not -match. There is the same issue with several other Dell models with overlapping names.
I'll try and get to posting some suggestions.
Allan. On Mar 15, 2019 10:01 AM, "damon5334" notifications@github.com wrote:
I have some Dell Optiplex 9010 systems, we have driver packs for the 9010 as well as the 9010 AIO and because it sees a newer Optiplex 9010 AIO driver package it is downloading that instead.
The logs say that the SKU matches for both the 9010 package as well as the 9010 AIO package, which is strange since they are different.
Am I missing something?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SCConfigMgr/ConfigMgr/issues/114, or mute the thread https://github.com/notifications/unsubscribe-auth/AoM9WH1uf-zPBTsYCOEZeF3O5bibbBiUks5vW8PwgaJpZM4b2y15 .
Is this related to why I'm getting 5250 drivers on an E5250 device?
There is a bug. The comparator needs to be -eq in the script, not -match. There is the same issue with several other Dell models with overlapping names. I'll try and get to posting some suggestions. Allan. … On Mar 15, 2019 10:01 AM, "damon5334" @.***> wrote: I have some Dell Optiplex 9010 systems, we have driver packs for the 9010 as well as the 9010 AIO and because it sees a newer Optiplex 9010 AIO driver package it is downloading that instead. The logs say that the SKU matches for both the 9010 package as well as the 9010 AIO package, which is strange since they are different. Am I missing something? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#114>, or mute the thread https://github.com/notifications/unsubscribe-auth/AoM9WH1uf-zPBTsYCOEZeF3O5bibbBiUks5vW8PwgaJpZM4b2y15 .
Probably. And it would be the same for all of the other Dell models where one model name is a substring of the other model name.
Allan.
On Mon, Mar 18, 2019 at 8:14 AM kenifyable notifications@github.com wrote:
Is this related to why I'm getting 5250 drivers on an E5250 device?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SCConfigMgr/ConfigMgr/issues/114#issuecomment-473926775, or mute the thread https://github.com/notifications/unsubscribe-auth/AoM9WFTuTi4qibtd7GWnsXc27KuqT0w8ks5vX58vgaJpZM4b2y15 .
The same issue exists for BIOS packages. The change for Invoke-CMDownloadBIOSPackage.ps1 would be to change from:
# Computer detection method matching
$ComputerDetectionResult = $false
switch ($ComputerManufacturer) {
"Hewlett-Packard" {
$PackageNameComputerModel = $Package.PackageName.Replace("Hewlett-Packard", "HP").Split("-").Trim()[1]
}
Default {
$PackageNameComputerModel = $Package.PackageName.Split("-").Replace($ComputerManufacturer, "").Trim()[1]
}
}
switch ($ComputerDetectionMethod) {
"ComputerModel" {
if ($PackageNameComputerModel -match $ComputerModel) {
Write-CMLogEntry -Value "Match found for computer model using detection method: $($ComputerDetectionMethod) ($($ComputerModel))" -Severity 1
$ComputerDetectionResult = $true
}
}
"SystemSKU" {
if ($Package.PackageDescription -match $SystemSKU) {
Write-CMLogEntry -Value "Match found for computer model using detection method: $($ComputerDetectionMethod) ($($SystemSKU))" -Severity 1
$ComputerDetectionResult = $true
}
else {
Write-CMLogEntry -Value "Unable to match computer model using detection method: $($ComputerDetectionMethod) ($($SystemSKU))" -Severity 2
if ($PackageNameComputerModel -match $ComputerModel) {
Write-CMLogEntry -Value "Fallback from SystemSKU match found for computer model instead using detection method: $($ComputerDetectionMethod) ($($ComputerModel))" -Severity 1
$ComputerDetectionResult = $true
}
}
}
}
to:
# Computer detection method matching
$ComputerDetectionResult = $false
switch ($ComputerManufacturer) {
"Hewlett-Packard" {
$PackageNameComputerModel = $Package.PackageName.Replace("Hewlett-Packard", "HP").Split("-").Trim()[1]
}
Default {
$PackageNameComputerModel = $Package.PackageName.Split("-",2).Replace($ComputerManufacturer, "").Trim()[1]
}
}
switch ($ComputerDetectionMethod) {
"ComputerModel" {
if ($PackageNameComputerModel -eq $ComputerModel) {
Write-CMLogEntry -Value "Match found for computer model using detection method: $($ComputerDetectionMethod) ($($ComputerModel))" -Severity 1
$ComputerDetectionResult = $true
}
}
"SystemSKU" {
if ($Package.PackageDescription -match $SystemSKU) {
Write-CMLogEntry -Value "Match found for computer model using detection method: $($ComputerDetectionMethod) ($($SystemSKU))" -Severity 1
$ComputerDetectionResult = $true
}
else {
Write-CMLogEntry -Value "Unable to match computer model using detection method: $($ComputerDetectionMethod) ($($SystemSKU))" -Severity 2
if ($PackageNameComputerModel -eq $ComputerModel) {
Write-CMLogEntry -Value "Fallback from SystemSKU match found for computer model instead using detection method: $($ComputerDetectionMethod) ($($ComputerModel))" -Severity 1
$ComputerDetectionResult = $true
}
}
}
}
Should be fixed in both scripts now. Would be appreciated if anyone could verify.
I have some Dell Optiplex 9010 systems, we have driver packs for the 9010 as well as the 9010 AIO and because it sees a newer Optiplex 9010 AIO driver package it is downloading that instead.
The logs say that the SKU matches for both the 9010 package as well as the 9010 AIO package, which is strange since they are different.
Am I missing something?