Client Automation - How to remove duplicate computers ?

Document ID : KB000118774
Last Modified Date : 31/10/2018
Show Technical Document Details
How to remove the duplicate machines which appear under All Computers folder ?
Use attached script 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 in a temp directory (eg: c:\temp\remove_dup_computer).
User-added image

2- In DSM explorer, under Computers and Users, create a group with name __TODELETE__
User-added image

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:
remove_dup_computers.bat sql_server_name\instancename

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.

Example :

Machine JY_PC5 appears in duplicate under “All Computers”
User-added image

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 :

User-added image
File Attachments: