Query Lenovo Warranty Information with PowerShell

I used this for an automatic Snyc related to Customer Asset List, to get the Warranty Start and END – Date for Lenovo Hardware.

Lenovo is providing an API to get that information.

Please contact your Partner Manager to get a ClientID. This is used to authenticate.

Here is the Code

$SerialNumber="00000000"
$ClientId = '004z0000pq0io03zhyu7/0==';


$headers = @{
    'ClientId' = $ClientId
};


$ApiObject = Invoke-RestMethod -Uri "http://supportapi.lenovo.com/V2.5/Warranty?Serial=$SerialNumber" -Headers $headers;

The Result looks like this for the Variable $ApiObject

If you take a look at “$ApiObject.Warranty” you see the License Details

Michael Seidl aka Techguy

Leave a Comment

Your email address will not be published. Required fields are marked *

*