So sometime in the last month or two Dell has made changes to their API. I had been using a script posted to poshcode to gather warranty information on all our workstations but that no longer works. So I figured I’d take a stab at writing it myself. Problem is, I know jack crap about parsing XML with PowerShell. I’m beyond frustrated and just looking for some guidance before I hulk-smash my desk.
Here is the uri I’m using (complete with service tag and api key): https://api.dell.com/support/v2/assetinfo/warranty/tags.xml?svctags=1763DX1&apikey=1adecee8a60444738f280aad1cd87d0e. Plug that into a browser and I get pretty pretty XML.
If I run (Invoke-WebRequest https://api.dell.com/support/v2/assetinfo/warranty/tags.xml?svctags=1763DX1&apikey=1adecee8a60444738f280aad1cd87d0e).Content it returns the XML, but I can’t figure out how to pull out the information I need - namely the warranty StartDate and EndDate.