Open nf-jk opened 2 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.
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.
From what i understand the script is getting the model of the device but Lenovo has moved the repository.
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.
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.
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 ...