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.
- Re-run unfinished job where it left off
- Parameter-less run
- Drag'n drop run
- Locally saved Client-ID (Note: Check out Client-ID encryption)
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.
- Double-click the
.exe
or run the.ps1
script with Powershell. - It will check for the required modules, they will most likely not exist. Type "A" when the question to install appears.
- Then it asks for your ClientID. Enter your Lenovo Client-ID, this is provided by your Lenovo Representative.
- Follow one of the following steps
Note: Only supported by the
.exe
file.
- Drag your
.xlsx
or.csv
file onto the.exe
file. - Now wait for it to finish
- When done, it will output the file to
{original-file-name}-updated.xlsx
or{original-file-name}-updated.csv
, depending on the input.
- Double-click the
.exe
or run the.ps1
script with Powershell. - Open the Excel or CSV file.
-
If your computer supports it, an open file dialog will be shown. Select the
.xlsx
file or.csv
, containing at least aSerial Number
column.
(If aModel
column is present it will only import serials whereModel = 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.
-
- Now wait for it to finish
- When done, it will output the file to
{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).