jantari / LSUClient

Orchestrate driver, BIOS/UEFI and firmware updates for Lenovo computers 👨‍💻
https://jantari.github.io/LSUClient-docs/
MIT License
208 stars 22 forks source link

No packages for computer model #110

Open nf-jk opened 3 weeks ago

nf-jk commented 3 weeks ago

Version

1.6.2

Computer Model

20VLS0L100

Problem

When running Get-LSUpdate.ps1 I get the following error;

No packages for computer model '20VL' could be retrieved from repository 'https://download.lenovo.com/catalog' At C:\Program Files\WindowsPowerShell\Modules\LSUClient\1.6.2\public\Get-LSUpdate.ps1:159 char:13 throw "No packages for computer model '${Model}' could be ...


     CategoryInfo          : OperationStopped: (No packages for...vo.com/catalog':String) [], RuntimeException
     FullyQualifiedErrorId : No packages for computer model '20VL' could be retrieved from repository 'https://download.lenovo.com/catalog'

I have been using this for a while to update various Lenovo models with no issues including 20VLS0L100 via MDT 

<img width="777" alt="Screenshot 2024-10-28 124158" src="https://github.com/user-attachments/assets/febf6a89-d24a-44d7-b70e-a1f1a64bea8e">

<img width="917" alt="Screenshot 2024-10-28 130458" src="https://github.com/user-attachments/assets/d0e20c3d-b2f0-4983-9f75-5fcfb50b034d">

### Additional context

_No response_
jantari commented 3 weeks ago

I think the root cause is that Get-PackagePathInfo is not recognized as a command. It is part of LSUClient so I believe your installation of the module must be corrupt. The file C:\Program Files\WindowsPowerShell\Modules\LSUClient\1.6.2\private\Get-PackagePathInfo.ps1 should exist on that computer.

To be sure I would suggest uninstalling and re-download the module first:

Remove-Module LSUClient
Uninstall-Module -Name LSUClient -AllVersions
Remove-Item -LiteralPath "C:\Program Files\WindowsPowerShell\Modules\LSUClient" -Recurse -Force -ErrorAction Ignore

Install-Module LSUClient

and see if the problem persists.

nf-jk commented 3 weeks ago

the following is the script i use in my MDT task sequence this installs the module as part of the script so i'm not sure how its getting corrupt on clean installs of windows

Write-Progress -Activity "Installing Lenovo updates" -Status "Fetching LSUClient module"

$ProgressPreference = "SilentlyContinue" Install-PackageProvider -Name NuGet -Force | Out-Null Install-Module -Name LSUClient -Force | Out-Null $ProgressPreference = "Continue"

$updates = Get-LSUpdate | Where-Object { $_.Installer.Unattended } $updateIndex = 1 foreach ($update in $updates) {

$percentComplete = ($updateIndex / $updates.Count) * 100
write-progress -Activity "Installing Lenovo updates" -Status "Installing $updateIndex of $($updates.Count): $($update.Title)" -PercentComplete $percentComplete

#Write-Host "Installing update $i of $($updates.Count): $($update.Title)"

Install-LSUpdate -Package $update -Verbose
$updateIndex++

}

I have ran the script manually on a different model of Lenovo (82J4) and got this warning. Screenshot 2024-10-29 085854

From what i understand the script is getting the model of the device but Lenovo has moved the repository.

jantari commented 3 weeks ago

Ok that definitely looks like an issue with LSUClient. That URL should end with 82J4_Win10.xml or 82J4_Win11.xml not just Win. I'll look into it, thanks.

jantari commented 1 week ago

Hi, can you please add these commands to your script, right after $updates = Get-LSUpdate | Where-Object { $_.Installer.Unattended }:

& (Get-Module LSUClient) { echo $script:CachedHardwareTable }
& (Get-Module LSUClient) { Get-WindowsVersion }
$Error.Count; $Error | Select-Object * | Format-List *

and report back the output you get, it will be very helpful to troubleshoot this issue. Thanks.

jantari commented 4 days ago

Hi, this is an interesting issue and I would like to proceed with troubleshooting it, but I need the output from commands above.