Duplicate Serial Numbers
Over time we have PCs that have been reimaged for various reasons. The problem is that the techs aren't always diligent in deleting the old objects from AD. Is it possible to run a report to find duplicate serial numbers to aid in cleaning up AD?
0
Comments
My approach isn't perfect, but should be good enough.
Computer, Serial Number, "Serial Number",
Computer, Name, "Count", Count
You can sort by the Count column and copy pasta the serial numbers that are > 1 into PDQI's search box.
Thank you, this works well enough :-)
Create an SQL report and past the following into it.
SELECT UPPER(SerialNumber) AS SerialNumber, Name AS Computer
FROM Computers where SerialNumber IN (SELECT SerialNumber FROM Computers GROUP BY SerialNumber HAVING COUNT(*) > 1)
AND NOT SerialNumber = '' AND <ComputerFilter>
ORDER BY SerialNumber ASC
I forgot to mention what it does. That SQL report will display a list of serial numbers and computers for any duplicate computers with the same serial number. It then sorts the list by serial number so that all the same serial numbers will be grouped together and you will see exactly witch computer accounts have the same serial.
One step further I think would be to add the ONLINE status to show what one is currently being used.
Here is the updated one with Online Status:
SELECT UPPER(SerialNumber) AS SerialNumber, Name AS Computer, Computers.IsOnline AS Online
FROM Computers where SerialNumber IN (SELECT SerialNumber FROM Computers GROUP BY SerialNumber HAVING COUNT(*) > 1)
AND NOT SerialNumber = '' AND <ComputerFilter>
ORDER BY SerialNumber ASC