This is an unofficial powershell script for requesting warranty information for PCs from Lenovo. It's the same data you find from the Lenovo warranty check site.
It will keep the existing columns and add/replace these columns in the outputted file.
Name
Model
Manufacturer
Warranty End
Example:
Serial Number, Name, Model, Manufacturer, Warranty End
001DUMMY, THINKPAD-L480-TYPE-20LS-20LT, 20LTS5SP00, Lenovo, 24/10/2021 00:00:00
Note: The
get-lenovo-warranty.ps1
andget-lenovo-warranty.exe
is referred to as.ps1
and.exe
, respectively.
Either download the get-lenovo-warranty.ps1 script from this repository. Or download the latest windows executable from the Releases page.
.exe
or run the .ps1
script with Powershell.Note: Only supported by the
.exe
file.
.xlsx
or .csv
file onto the .exe
file.{original-file-name}-updated.xlsx
or {original-file-name}-updated.csv
, depending on the input..exe
or run the .ps1
script with Powershell.If your computer supports it, an open file dialog will be shown. Select the .xlsx
file or .csv
, containing at least a Serial Number
column.
(If a Model
column is present it will only import serials where Model = Lenovo
or is blank).
If not it will ask for a file path in the terminal. Either drop a file on the terminal or manually enter the path.
{original-file-name}-updated.xlsx
or {original-file-name}-updated.csv
, depending on the input.Parameter name | Value/Type | Description |
---|---|---|
FilePath |
/path/to/the/serial-file.xlsx |
Path to the file to be imported (either .csv or .xlsx ) |
SerialsPerRequest |
100 |
How many serials to put in each request |
MaxAttempts |
3 |
How many failed requests to try before a 30s sleep |
ConfigPath |
.lenovo-serial-config.json |
The config file contaning the encrypted Client-ID and API url |
TempFilePath |
.lenovo-serials.tmp.csv |
The .csv file containing the unfinished job, it uses this file if the job is aborted or crashes |
InvalidSerialsPath |
.lenovo-serials.invalid.csv |
The .csv file containing the serials that is either invalid or failed |
The Client-ID
is saved encrypted in the config file and can only be unencrypted by the same computer.
BUT! This is only supported on Windows, any other OS (MacOS / any Linux distro) will only save it encoded (ie. NOT secured).
MIT