I have a powershell script to query AD and get all computers that do not have the word "Server" in the operating System, it pings the computer to see if it's on line if it's on line and the manufacturer is Dell it get the warranty information and a few other things.
The script works great, but my problem is they have renewed the warranty on some of the machines so a query of the extended warranties with prosupport will turn up more then one value for these machine.
So my challenge is to add another section to the script that will sort the csv file by unique serial number, with the most current warranty information if it has 2 extended warranties or edit the script so that only the most current warranty information is used. I have attached a copy of my output file in hopes that would clear up what I mean
Basically I want to run the script 3 to 4 times a day for a few weeks to make sure I get all the machines and only keep the most current information
Not to mention you make an individual WMI call for each property you receive, even from the same class. That is unnecessary.