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

Property cannot be found on this object and no packages for model 21AJ #82

Closed HaglerGM closed 1 year ago

HaglerGM commented 1 year ago

Version

1.5.2

Computer Model

21AJS6SD00

Problem

When running the the following commands via a script in a SCCM Task Sequence, we are receiving errors and no updates. However, running these commands outside of the TS, no errors occur. $updates = Get-LSUpdate | Where-Object { $_.Installer.Unattended } $updates | Save-LSUpdate -Verbose $updates | Install-LSUpdate -Verbose

Error logs attached. Several errors regarding "The property cannot be found on this object at 'LSUCLient\1.5.2\private\Get-PackagePathInfo.p1'

Additionally receive the error "No packages for computer model '21AJ' could be retrieved from the repository" Full error logs from the task sequence attached below. LSUCLient Errors.txt

Additional context

No response

jantari commented 1 year ago

Some things to try:

  1. Are you running this task as SYSTEM, a local user or a domain user? Try a different user
  2. If you configure any proxy settings beforehand, either in the task sequence or with a policy, double check they are valid and complete
  3. If you run the module from a network share, try running it from a local directory on the machine instead
  4. Try running netsh winsock reset first - apparently it helped here
HaglerGM commented 1 year ago

Number 1 seemed to be the issue. I was having problems reaching the powershell module repository during the task sequence, so I changed my script to just copy the LSUClient module from a network drive. Doing so required I change the script to run as a domain admin with file copy permissions instead of SYSTEM, as it was previously. The fix for me was to split it into two scripts; one copying the module over and running as a domain admin, the other running the updates as SYSTEM. There may be a more efficient way to do this, but at least it seems to work.

jantari commented 1 year ago

Great! I'll close this then.