Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Generate Report on Machines with Duplicate GUID Values?

We ran into an issue where machines with duplicate GUID values (most likely due to cloning) were not being removed from PDQ Inventory after syncing with AD if at least one of those machines is still online. Therefore, I need to pull a report showing all machines that have duplicate GUID values so we can clean up the stragglers. Any ideas on how to do this?

0

Comments

4 comments
Date Votes
  • Hi Netops,

    Is this what your after? Define Report (Dont forget to select appropriate collection source)

    Tables Column Title Summary
    Computer AD GUID Computer AD GUID
    Computer AD GUID Computer AD GUID Count Count

    You could run a PowerShell script to get the GUID data and perhaps export it...? I haven't got exporting to excel figured out yet, maybe PowerShell master can assist here. Using 'Name -like "ext*"' as all our workstations names start with ext.

    Get-ADComputer -Filter 'Name -like "ext*"' -Properties IPv4Address | FT Name,ObjectGUID -A
    
    0
  • I don't think Inventory pulls the GUID for computers from Active Directory, so building a report in PDQ Inventory wouldn't work with out importing those GUIDs into custom fields. Running a query like Triggels has posted will probably be the quickest method.

    0
  • Try this SQL report:

    SELECT
    	  Computers.Name AS "Computer Name"
    	, ADGuidDuplicates.ADGuid AS "AD GUID"
    FROM
    	-- https://stackoverflow.com/a/21980136
    	(
    		SELECT
    			  Computers.ADGuid
    			, COUNT(*) AS "Count"
    		FROM
    			Computers
    		WHERE
    			<ComputerFilter>
    			AND
    			Computers.ADGuid <> ''
    		GROUP BY
    			Computers.ADGuid
    		HAVING
    			Count > 1
    	) ADGuidDuplicates
    INNER JOIN
    	Computers USING (ADGuid)
    WHERE
    	<ComputerFilter>
    ORDER BY
    	"Computer Name"
    
    0
  • @chrisj PDQ Inventory actually does pull AD GUID, at least the version I'm running..AD GUID Column

    0