< Back

Get-LenovoWarrantyInfo

Sat Jan 18, 2020 9:44 am

NAME Get-LenovoWarrantyInfo



SYNOPSIS

This cmdlet is designed to retrieve the warranty information for Lenovo devices.





SYNTAX

Get-LenovoWarrantyInfo [[-ComputerName] <String>] [-Credential <Object>] [<CommonParameters>]



Get-LenovoWarrantyInfo [-SerialNumber] <String> [[-Product] <String>] [<CommonParameters>]





DESCRIPTION

This cmdlet will take a supplied Lenovo serial number and product number and perform a warranty lookup using a

published Lenovo REST API.



This cmdlet can also take a computer name as a parameter that will in turn retrieve the serial number and model

number using WMI before

retrieving the warranty status.





PARAMETERS

-ComputerName <String>

The name of the computer that should be queried via WMI to retrieve its serial number for subsequent warranty

lookup.



Required? false

Position? 0

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Credential <Object>

The credential object representing the credentials that should be used when performing a WMI query of a remote

computer.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SerialNumber <String>

The serial number of the Lenovo device that should be used for the query.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Product <String>

The Lenovo product code that should be used in the warranty lookup.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES





This cmdlet uses a REST API that was found in a Lenovo Support Forum discussion.



-------------------------- Perform query on local machine --------------------------



Get-LenovoWarrantyInfo



This command will query the local machine using WMI to retrieve its serial number and then query the Lenovo

service to retrieve warranty information







Get-LenovoWarrantyInfo



WarrantyEndDate : 2017-08-04

ShipDate : 2014-07-23

Type : 20C0

SerialNumber : MP05SKGB

WarrantyStartDate : 2014-08-05

Model : S05200

Product : 20C0S05200



-------------------------- Lookup warranty information of remote computer --------------------------



$cred = Get-Credential

Get-LenovoWarrantyInfo -ComputerName yoga1 -Credential $cred



The first line creates a credential object to be used when connecting to remote computer using WMI



The second line will result in a WMI query to the computer named yoga1 using the supplied credential.

The WMI query will return the devices serial number and model information to supply or the warranty lookup.







WarrantyEndDate : 2017-08-04

ShipDate : 2014-07-23

Type : 20C0

SerialNumber : MP05SKEZ

WarrantyStartDate : 2014-08-05

Model : S05200

Product : 20C0S05200





RELATED LINKS