dotps1 / HPWarranty

PowerShell module to help retrieve Hewlett-Packard Warranty Information
https://www.powershellgallery.com/packages/HPWarranty/
43 stars 17 forks source link

in systems with more than one Care Pack, only the first will be displayed. #4

Closed RonnyBunke closed 9 years ago

RonnyBunke commented 9 years ago

I want to know whether the server still has maintenance. And when do I have to buy a new Care Pack. Therefore, I think it makes more sense in the variable OverallContractEndDate XML file to read it.

return [PSObject] @{
    'Servername'              = $ComputerName
    'SerialNumber'            = $SerialNumber
    'ProductNumber'           = $ProductNumber
    'WarrantyStartDate'       = ([Xml]$entitlementAction.Envelope.Body.GetOOSEntitlementList2Response.GetOOSEntitlementList2Result.Response).GetElementsByTagName("WarrantyStartDate").InnerText
    'OverallWarrantyEndDate'  = ([Xml]$entitlementAction.Envelope.Body.GetOOSEntitlementList2Response.GetOOSEntitlementList2Result.Response).GetElementsByTagName("OverallWarrantyEndDate").InnerText
    'OverallContractEndDate'  = ([Xml]$entitlementAction.Envelope.Body.GetOOSEntitlementList2Response.GetOOSEntitlementList2Result.Response).GetElementsByTagName("OverallContractEndDate").InnerText
}
dotps1 commented 9 years ago

Please feel free to fork this repo, and change the output the function however you would like to use it. Thank you.

dotps1 commented 9 years ago

Sorry for the quick reply, i reviewed this a few more times, and also explored the XML return from ISEE again. And i do agree with you, i have updated the return PSObject from the Invoke-HPWarrantyEntitlementList to contain the properties and values you suggest.

Thanks for the work!