MSEndpointMgr / ModernDriverManagement

Official repo of Modern Driver Management from MSEndpointMgr.com
https://www.msendpointmgr.com
MIT License
132 stars 77 forks source link

Issue, when using -Debug in Non-Interactive PS (OS Install / HTTPS) #265

Open BZMtx opened 11 months ago

BZMtx commented 11 months ago

While working with this tool on OS Installation, i have encountered a problem and have fixed it for myself. Maybe it can be relevant for future releases.

When using the -Debug mode while not having an interactive Powershell-window, the following lines will not work, since they need an user input:

Line 906: Add-Type -TypeDefinition $CertificationValidationCallback Fixed version: Add-Type -TypeDefinition $CertificationValidationCallback -Debug:$false

same error in ModernBIOSManagement

BZMtx commented 11 months ago

Found another bug in ModernBIOSManagement

In Line 1188, when multiple matching BIOS Versions were found, the object $PackageList is no longer an array, so that the if() statement will fail. Changed it from if (PackageList.Count -eq 1) { to if ($true) {#PackageList.Count -eq 1) {

BZMtx commented 10 months ago

And another one (when multiple matching BIOS packages are detected):

Invoke-CMDownloadBIOSPackage.ps1 Line 1183 + 1186 > the property "PackageCreated" does not exist. Instead use the property "SourceDate" (HP + Microsoft part)