Invoke-LsuClientUpdate
Description
This script utilizes the LSU Client PowerShell module to install any updates that are both applicable and silently installable on any Lenovo machine whose battery is currently not discharging.
Requirements
PowerShell V5.
Usage
- If the manufacturer of the computer is not specifically Lenovo, exit the script.
- If the battery is discharging, exit the script and log an error.
- Using the LSU Client module, retrieve all available and silently installable updates and save them.
- Install all found updates with the LSU Client module.
- Check the results of the attempted install. If the results are successful, log the success; if there is a failure, log the failure.
- Return the results as an object.
.\Invoke-LSUClientUpdate.ps1
This command will attempt to install all available and silently installable package updates on the target.
Output
.\Invoke-LSUClientUpdate-log.txt
.\Invoke-LSUClientUpdate-error.txt
Example Output
[System.Object]:
ID : n2tbr05w
Title : Lenovo Battery Firmware Update Utility - 10 (1709 or Later)/11 (21H2 or Later)
Type : Firmware
Success : False
FailureReason : INSTALLER_EXITCODE
PendingAction : NONE
ExitCode : -3
StandardOutput :
StandardError :
LogOutput :
Runtime : 00:00:00.5681666
ID : r1mst13w
Title : Synaptics UltraNav Driver - 10 (1809 or Later)/11 (21H2 or Later)
Type : Driver
Success : True
FailureReason :
PendingAction : REBOOT_SUGGESTED
ExitCode : 3010
StandardOutput :
StandardError :
LogOutput :
Runtime : 00:00:21.3074228