cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Moopere
Engaged Sweeper II
Hello Folks,

Looks like scanning HP warranty on some devices is broken when we're scanning against the HPE database.
See this:

Parsing error: Cannot parse 'https://support.hpe.com/hpsc/wc/public/find?lang=us&rows%5B0%5D.item.countryCode=US&rows%5B0%5D.item.serialNumber=CNB7G7W36J'

If I manually copy the URL above and end up at the HPE site it states that:

"The information you provided does not match our records. Please review your entry again and make any necessary edits or contact HPE for more assistance."


If one uses the HP warranty check site (not HPE):

https://support.hp.com/us-en/checkwarranty

Its happy and doesn't produce any error, just provides the correct warranty details.

Is there a way to add an alternative warranty check URL to lansweeper?

1 ACCEPTED SOLUTION
zaty
Engaged Sweeper
Hi,
i wrote for myself Powershell script to get all HP computers/laptop assets from DB, use Powershell module to get warranty info thru SOAP API and update asset in DB.


You will need these PS1 modules:
https://github.com/dotps1/HPWarranty
https://docs.microsoft.com/en-us/sql/powershell/download-sql-server-ps-module?view=sql-server-ver15


$assets = Invoke-Sqlcmd -ServerInstance servername -Database lansweeperdb -Username lansweeperuser -Password 'password' -Query @"
SELECT a.AssetID, a.AssetName, b.Serialnumber, b.SystemSKU
FROM lansweeperdb.dbo.tblAssets a, lansweeperdb.dbo.tblAssetCustom b
WHERE a.AssetID = b.AssetID AND
a.Assettype = -1 AND
b.Warrantydate is NULL AND
b.Manufacturer in ('HP','Hewlett-Packard');
"@

foreach ($asset in $assets) {
$assetId = $asset.AssetID
$assetName = $asset.AssetName

$warranty = ((Get-HPIncWarrantyEntitlement -SerialNumber $asset.SerialNumber -ProductNumber $asset.SystemSKU).OverallEntitlementEndDate | Measure-Object -Maximum).Maximum
Write-Output "$assetID $assetName $warranty"

Invoke-Sqlcmd -ServerInstance servername -Database lansweeperdb -Username lansweeperuser -Password 'password' -Query @"
UPDATE dbo.tblAssetCustom
SET Warrantydate = '$warranty'
WHERE assetID = $assetId
"@
}

View solution in original post

31 REPLIES 31
Moopere
Engaged Sweeper II
v7.2.105.2

Checking for updates tells me that I'm up to date.
Esben_D
Lansweeper Employee
Lansweeper Employee
Are you sure you are on the latest version?

We regularly update HP warranty retrieval since HP likes to do the same 😉

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now