From 4710b5bebae2fbed4bd5a3f67be027bf88fd3a27 Mon Sep 17 00:00:00 2001 From: Justin <35099241+PowershellBacon@users.noreply.github.com> Date: Thu, 4 May 2023 12:04:36 -0500 Subject: [PATCH 1/2] Update DriverAutomationTool.psw Add XML edit to account for similarly named OptiPlex 7010's and separates them based on ReleaseID. --- Current Branch/7.2.2/DriverAutomationTool.ps1 | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Current Branch/7.2.2/DriverAutomationTool.ps1 b/Current Branch/7.2.2/DriverAutomationTool.ps1 index 5700f1e..48f2115 100644 --- a/Current Branch/7.2.2/DriverAutomationTool.ps1 +++ b/Current Branch/7.2.2/DriverAutomationTool.ps1 @@ -14172,6 +14172,32 @@ AABJRU5ErkJgggs=')) } if ($global:DellModelXML -eq $null) { # Read XML File + [xml]$xmledit = Get-Content -Path (Join-Path -Path $global:TempDirectory -ChildPath $DellXMLFile) -Raw + $7010Sku = New-Object -TypeName System.Collections.ArrayList + $7010Sku.AddRange(@( + "0BCC" + "0BCD" + "0BCE" + "0BCF" + "0BE3" + "0BE4" + "0BE5" + "0BE6" + "0BD0" + "0BD1" + "0BD2" + "0BD3" + )) + + foreach($driveredit in ($xmledit.driverpackmanifest.driverpackage | where {$_.SupportedSystems.Brand.Model.name -eq "Optiplex 7010"})){ + foreach($modeledit in $driveredit.SupportedSystems.Brand.Model){ + if($modeledit.systemID -in $7010Sku){ + $modeledit.name = "$($modeledit.name) ReleaseID $($driveredit.releaseID)" + } + } + + } + $xmledit.Save((Join-Path -Path $global:TempDirectory -ChildPath $DellXMLFile)) global:Write-LogEntry -Value "- Reading driver pack XML file - $global:TempDirectory\$DellXMLFile" -Severity 1 [xml]$global:DellModelXML = Get-Content -Path (Join-Path -Path $global:TempDirectory -ChildPath $DellXMLFile) -Raw # Set XML Object From e63452f9b83be63317bd881d224620f948f19b32 Mon Sep 17 00:00:00 2001 From: Justin <35099241+PowershellBacon@users.noreply.github.com> Date: Thu, 4 May 2023 12:14:53 -0500 Subject: [PATCH 2/2] Update DriverAutomation.ps1 just fixing formatting. --- Current Branch/7.2.2/DriverAutomationTool.ps1 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Current Branch/7.2.2/DriverAutomationTool.ps1 b/Current Branch/7.2.2/DriverAutomationTool.ps1 index 48f2115..03801cd 100644 --- a/Current Branch/7.2.2/DriverAutomationTool.ps1 +++ b/Current Branch/7.2.2/DriverAutomationTool.ps1 @@ -14190,12 +14190,11 @@ AABJRU5ErkJgggs=')) )) foreach($driveredit in ($xmledit.driverpackmanifest.driverpackage | where {$_.SupportedSystems.Brand.Model.name -eq "Optiplex 7010"})){ - foreach($modeledit in $driveredit.SupportedSystems.Brand.Model){ - if($modeledit.systemID -in $7010Sku){ - $modeledit.name = "$($modeledit.name) ReleaseID $($driveredit.releaseID)" - } - } - + foreach($modeledit in $driveredit.SupportedSystems.Brand.Model){ + if($modeledit.systemID -in $7010Sku){ + $modeledit.name = "$($modeledit.name) ReleaseID $($driveredit.releaseID)" + } + } } $xmledit.Save((Join-Path -Path $global:TempDirectory -ChildPath $DellXMLFile)) global:Write-LogEntry -Value "- Reading driver pack XML file - $global:TempDirectory\$DellXMLFile" -Severity 1