→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

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
Richie_Rich
Lansweeper Employee
Lansweeper Employee
Dang it - you are indeed correct 😞
Richie_Rich
Lansweeper Employee
Lansweeper Employee
The following KB shows how to edit the Asset warranty URL FYI
https://www.lansweeper.com/knowledgebase/adding-manufacturer-support-links/

Richie_Rich wrote:
The following KB shows how to edit the Asset warranty URL FYI
https://www.lansweeper.com/knowledgebase/adding-manufacturer-support-links/



This URL is not used to scan the warranty on the computer. Granted you can go to the asset and click on the serial number to get the warranty info, but this will not help with things like the warranty report.
abarker5
Engaged Sweeper II
I can't believe this still isn't fixed. None of our HP products warranties are showing and we have thousands of errors in the Lansweeper warranty scan error report. When I use the URL in the error report to manually go to the HP warranty lookup site, it tells me the serial number isn't enough and I also have to enter a product number.
lkr
Engaged Sweeper
HI Esben & Co.

Warranty lookup was been the specific reason, that we have bought this product.

Lansweeper connects to the HP Enterprise server, when looking up clients.
Look at https://github.com/dotps1/HPWarranty/tree/master/HPWarranty/Public
You will see that there at two different scripts.

I believe an attribute like chassis type, can be used to determine which server to contact.

Honestly.
This has been a problem for something like 6 months…
I have sent you at least two mails explaining that LS looks up warranty on the wrong server/Company
As I have explained in my email, HP and HPE have split into two different companies - and have different warranty databases. It may well be that the HP API does not work, but fix the f... pointers first.

I am so disappointed that you haven't fixed this.
My colleagues are loosing confidence in the product.

Lars Kruse
€ 24.000 p.a. customer.
martin_wildi
Engaged Sweeper
I do have the same Problem 😞

LanSweeper asks "https://support.hpe.com..." for Notebooks and Computers. Shouldn't this be hp.com? If i do the Check manually, i go to "https://support.hp.com/".

It's a real pain at the moment, customers rely on this information.

Thanks for fast patching.

greets
martin
Martin Wildi wrote:
I do have the same Problem 😞

LanSweeper asks "https://support.hpe.com..." for Notebooks and Computers. Shouldn't this be hp.com? If i do the Check manually, i go to "https://support.hp.com/".

It's a real pain at the moment, customers rely on this information.

Thanks for fast patching.

greets
martin


I totaly agree with this, it's not the right url used to check the Wks warranty.
I cannot remember where, but at a time, you were able to put a list of url for the warranty check in lansweeper.

Anyone have news about this issue ?

Does anyone have news about this
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
"@
}
mwrobo09
Champion Sweeper
Zaty,

This saved me so much time. I can't thank you enough.

I altered your script slightly to pull the purchase date as well. Uploaded 1600 devices with missing information within a few hours. Would have taken me forever, now I have reliable data for planning.

Thanks again.


$assets = Invoke-Sqlcmd -ServerInstance server -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
$StartDate = ((Get-HPIncWarrantyEntitlement -SerialNumber $asset.SerialNumber -ProductNumber $asset.SystemSKU).OverallEntitlementStartDate | Measure-Object -Minimum).Minimum
Write-Output "$assetID $assetName $warranty $StartDate"

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


tcharland
Engaged Sweeper
#12 from zaty
This worked great, thanks for the info. Even used to to update the purchase date.