Use attached script remove_dup_computer.zip which Is a script which puts the duplicate computers in a group __TODELETE__
The duplicate computers with the oldest “Last Run Date” are put in the group. Then computers could be deleted in DSM Explorer from this group.
Here is the method to use this script :
1- On the DOMAIN ITCM, uncompress the file remove_dup_computer.zip in a temp directory (eg: c:\temp\remove_dup_computer).
2- In DSM explorer, under Computers and Users, create a group with name __TODELETE__
3- Open a command prompt and go in temp directory created in step 1
cd /D c:\temp\remove_dup_computer
Execute the script remove_dup_computer.bat like this:
Or if you are logged with a user which has not enough rights to SQL Server :
remove_dup_computers.bat sql_server_name\instancename ca_itrm pwd_ca_itrm
The duplicate computers are put in folder __TODELETE__. Then they could be manually removed from this group in DSM Explorer.
Machine JY_PC5 appears in duplicate under “All Computers”
I execute the script:
remove_dup_computers.bat JY-R14SP2 ca_itrm NOT_changedR11
The duplicate machine with oldest “Agent Last Run” Date has been put in __TODELETE__ group :