Hey all so I have a sript that pulls a lot of info and throws it in a DB. Till recently I was also able to pull the warranty end date of Lenovo machines.
I used this:
$URL = "https://services.lenovo.com/ibapp/il/WarrantyStatus.jsp?type=$($Win32.Model)&serial=$($BIOS.SerialNumber)" $WebRequestResult = Invoke-WebRequest -Uri $URL $TDTagNames = $WebRequestResult.ParsedHtml.getElementsByTagName("TD") foreach ($TDTagName in $TDTagNames) { if (($TDTagName.innerHTML -match "\d{4}-\d{2}-\d{2}") -and ($TDTagName.width -eq 120)) { $Warranty = $TDTagName.innerHTML break } }
It looks like now that URL does not work anymore for some reason. So my question is does anyone know of an automated way to get this info? Is it possible to take a web page and insert info in a text box, submit that, and filter the return info for the date? I've been trying this on this webpage with no luck: http://support.lenovo.com/us/en/warrantylookup
Thanks for any help!! From what I've seen the method I was using was a standard way of doing it but it looks like Lenovo is not supporting it anymore. Thanks!