This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Finding and Removing Duplicate Computer Names

Is there a method to find duplicate computer names in SEC easily? Finding I have to go through each one of our groups and go down the list and eyeball them, which takes a long time with 30+ groups and 6800+ clients. How is this not a built-in feature



This thread was automatically locked due to age.
Parents
  • Hi,

    I would suggest querying the Sophos 'Core' database to obtain this information.

    As a basic example to just get a list of computers with the same name (doesn't factor in domain/workgroup name):

    SELECT name, COUNT(name) as Count FROM ComputersAndDeletedComputers GROUP BY name HAVING ( COUNT(name) > 1 )

    As a one liner from a command prompt:

    sqlcmd -E -S .\sophos -d SOPHOS521 -Q "SELECT name, COUNT(name) as Count FROM ComputersAndDeletedComputers GROUP BY name HAVING ( COUNT(name) > 1 )"

    .\sophos is your SQL instance: https://community.sophos.com/kb/en-us/113030
    SOPHOS521 is your SOPHOS core database - https://community.sophos.com/kb/en-us/17323

    Hope it helps.

    Regards,

    Jak

Reply
  • Hi,

    I would suggest querying the Sophos 'Core' database to obtain this information.

    As a basic example to just get a list of computers with the same name (doesn't factor in domain/workgroup name):

    SELECT name, COUNT(name) as Count FROM ComputersAndDeletedComputers GROUP BY name HAVING ( COUNT(name) > 1 )

    As a one liner from a command prompt:

    sqlcmd -E -S .\sophos -d SOPHOS521 -Q "SELECT name, COUNT(name) as Count FROM ComputersAndDeletedComputers GROUP BY name HAVING ( COUNT(name) > 1 )"

    .\sophos is your SQL instance: https://community.sophos.com/kb/en-us/113030
    SOPHOS521 is your SOPHOS core database - https://community.sophos.com/kb/en-us/17323

    Hope it helps.

    Regards,

    Jak

Children