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 get in touch with 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
Can you explain it more about getting client_id from Partner Manager. I have just lenovo laptop but I don’t have idea about Partner Manager. May you please guide me about this more?
Hi, this works only for companies with a Partner Manager, at least that time this Script was created.