Get-LnvUpdate#
Discovers available driver, BIOS, firmware, and utility updates for Lenovo systems.
Synopsis#
Fetches available update packages for Lenovo computers from the update repository.
Syntax#
Get-LnvUpdate [[-Model] <string>] [-All] [-IncludePhantomDevices]
[-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials]
[-Repository <string>] [-ScratchDirectory <string>]
[-StatusMode <string>] [-LogFile] [-DetailedLog] [-LogPath <string>] [-SkipSignatureCheck] [-ExplainDependencies]
Description#
Get-LnvUpdate queries the Lenovo update repository and returns available update packages. By default, only "needed" updates (applicable to the current system and not yet installed) are returned.
The function evaluates package applicability based on system hardware, BIOS version, and other configuration factors. All package files are downloaded to a scratch directory during applicability checking to verify digital signatures and availability before returning results.
Use the -All parameter to retrieve all available packages regardless of applicability or installation status.
Parameters#
| Parameter | Type | Description |
|---|---|---|
-Model |
string | Target computer model (default: current system) |
-All |
switch | Return all packages, including installed and non-applicable |
-IncludePhantomDevices |
switch | Include offline/disconnected devices in applicability checks |
-Proxy |
Uri | Proxy server URL for repository access |
-ProxyCredential |
PSCredential | Credentials for proxy authentication |
-ProxyUseDefaultCredentials |
switch | Use current user's credentials for proxy |
-Repository |
string | Path to local repository folder (instead of Lenovo online) |
-ScratchDirectory |
string | Directory for temporary files during processing (default: $env:TEMP) |
-StatusMode |
string | Change package status (custom filtering) |
-LogFile |
switch | Create logfile in default location (C:\ProgramData\Lenovo\...) |
-LogPath |
string | Create logfile in specified custom path |
-SkipSignatureCheck |
switch | Skip digital signature verification (not recommended) |
-ExplainDependencies |
switch | Attach the detailed result of every applicability and install test to the returned package objects, as the DependencyTests and InstallTests properties. Used by Debug-LnvUpdate. The tests are always recorded when -DetailedLog is used, this switch only additionally exposes them to the caller. |
Examples#
Example 1: Get applicable updates for current system#
Retrieves only needed updates (applicable but not installed) and displays them in a table.
Example 2: Get all available packages#
Shows the total count of all available packages, including installed and non-applicable.
Example 3: Get drivers for a different model#
$updates = Get-LnvUpdate -Model '20LS' -All
$updates | Where-Object { $_.Type -eq 'Driver' } | Save-LnvUpdate -Path "C:\20LS_Drivers"
Retrieves all drivers for model 20LS and downloads them.
Example 4: Query a local repository#
Queries packages from a local repository instead of Lenovo's online source.
Example 5: Generate update report with logging#
$updates = Get-LnvUpdate -LogPath "C:\Logs\updates.log" -Verbose
$updates | Group-Object -Property Category | Select-Object Name, Count
Retrieves updates while logging details to a custom path, then groups by category.
Output#
Returns an array of update package objects with properties such as:
Title- Display name of the packageVersion- Package versionReleaseDate- When the package was releasedCategory- Type of update (Driver, BIOS, Firmware, Application, etc.)IsApplicable- Whether the package is applicable to this systemIsInstalled- Whether the package is already installedSeverity- Severity level (Critical, Recommended, Optional)Installer- Details about the installation programFileSize- Size of the package in bytesPackageID- Unique identifierURL- Download URL
Notes#
Applicability Checking#
During applicability evaluation:
- All package files are temporarily downloaded to the scratch directory
- Digital signatures are verified to ensure package authenticity - unsigned packages are removed
- Files are deleted after processing unless errors occur
Logging Options#
-LogFile requests a transcript and -DetailedLog requests the structured per-package detection log. -LogPath redirects whichever log(s) you requested to a custom file or directory instead of the default location.
The two log types are independent: omitting -LogFile when you specify -LogPath suppresses the transcript, and omitting -DetailedLog suppresses the detection log.
Use a directory path with -LogPath when requesting both logs. If you point -LogPath at a single file with both switches active, the detection log is automatically renamed with a -DetailedLog suffix and a warning is emitted.
Performance#
- Applicability checking may take several minutes depending on network speed and update count
- Specify
-Modeland-Allif querying for a different computer since apllicability checking on a different device is unhelpful - Use
-Repositoryfor local queries to avoid network latency
Signature Verification#
-SkipSignatureCheckshould only be used if you need to modify package descriptor XML- Not recommended for production deployments