Duplicate Devices

Hi,

We're having major issues with duplicate devices in Tensor. When a device is re-imaged it creates a duplicate entry in Tensor. Is there any way you can perform an installation that uses the old device name or do you have a cleanup script that can remove duplicate devices? We simply cannot do this manually.

Matt

Tagged:

Comments

  • JeanK
    JeanK Posts: 7,040 Community Manager 🌍

    Hello @JLux,

    Before duplicating a machine, there are some preparations to do to avoid double IDs.

    You will find how to proceed here:


    Community Manager

  • echapa
    echapa Posts: 9

    Hello @JeanK

    We are having this same issue, however, what you shared as the solution is not what he's talking about - he used the term "re-imaged" but he may or may not be using an image with TeamViewer already installed, I'm assuming he is not.

    Simply reformatting and reinstalling the OS clean on a machine (without using an "image") using the same name (or any other name) and installing TeamViewer as the final step will create the duplicates he's referring to - multiple records of devices that are actually the same device, just before/after being reinstalled - this looks like the TeamViewer portal doesn't seem to be "smart" enough to realize it's the same device with the same serial number, and it was simply "rebuilt" (aka "reimaged").

  • JeanK
    JeanK Posts: 7,040 Community Manager 🌍

    Hi @echapa,

    Thank you for adding more background information so that I could get a better understanding of the question.

    I can confirm that getting a different TeamViewer ID is expected if you keep rebuilding your device, as our ID generation algorithm also takes OS information as a "part of the equation" to calculate the ID.

    Furthermore, we do not recognize based on the serial number or any other device-specific information; we only differentiate them with TeamViewer IDs.

    Of course, if you wish to continue the conversation with an engineer, you can open a support ticket anytime.

    I hope this could help to understand the technical limitation we have here.

    /JeanK

    Community Manager

  • echapa
    echapa Posts: 9

    Thanks @JeanK

    I do have a support ticket open about this. I do believe TeamViewer needs to re-evaluate how machines are getting identified, otherwise people will end up with hundreds if not thousands of duplicates in their computers list, and they probably count against their licensed device limit - do they?

    I had to come up with a script to clean up the duplicates but that shouldn't be required in the first place imho, and TeamViewer should instead avoid them getting created in the first place. Here's the script for @JLux. The script is provided as is, with no warranty. Use at your own risk. I've commented the last line that actually deletes devices, just so that you can take a look at what is actually getting deleted before doing so:

    #Install-Module TeamViewerPS
    $ApiToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    # Store the API token in the current Powershell session
    $Secure = ConvertTo-SecureString $ApiToken -AsPlainText -Force
    
    $devices=Get-TeamViewerDevice -ApiToken $Secure
    $GroupedByName = $devices | Group-Object -Property Name # Filter for devices with a 'last-seen' date
    $GroupedDuplicates = $GroupedByName | Where-Object {$_.Count -gt 1}    # Filter for duplicates
    ForEach ($DuplicateGroup in $GroupedDuplicates) {
        $Duplicates = $DuplicateGroup.Group | Sort-Object -Property OnlineState,LastSeenAt -Descending # Sort the duplicate device entries by OnlineState,'last-seen' (desc)
        $ToDelete = $Duplicates | Select-Object -Skip 1
        $Online = $ToDelete | Where-Object { $_.OnlineState -eq "Online" }
        if ($null -ne $Online) { #abort! online devices found in deletion list
            "Deletion aborted due to online devices found in deletion list"
        } else { #No online devices found in deletion list
            $ToDelete | Select-Object Name,TeamViewerID,LastSeen,OnlineState
            #Uncomment the next line to actually delete duplicates
            #$ToDelete | Remove-TeamViewerDevice -ApiToken $Secure #Remove the rest 
        }
    }
    


  • AndreasGapsch
    AndreasGapsch Posts: 7
    edited October 2022

    He TeamViewer @JeanK, the script from @echapa is helpful but as there is no last seen date for managed devices, I ask how we could get this running for managed devices. Could you please suggest, how I can get the following done...

    • Remove duplicated managed devices
    • Remove managed devices, which haven't been online for 60 days

    Thanks!

  • Dear TeamViewer Team, could please someone pick this up? Also, support is not really helpful...

  • JeanK
    JeanK Posts: 7,040 Community Manager 🌍

    Hello @AndreasGapsch,

    Thank you for reaching out!

    Our customer support engineers can provide you with scripts removing duplicated/ older < 60 days managed devices.

    Please open a ticket - our team will be happy to assist you.

    /JeanK

    Community Manager

  • Hello everyone, I just wanted to add to this post that I have opened a ticket but there is no script for managed devices. According to TV support, the "last_seen" flag is still in development and should appear sometime in the next few months (without guarantee). A sad state of things...🤬

    So, I wonder how do other companies identify managed devices that are obsolete and no longer used in TeamViewer? Do you simply leave the no longer active managed devices, or do you try manual comparisons? 🙄

  • What is the status on this?

  • tvsvcacc
    tvsvcacc Posts: 1

    Just want to share that it is now 8/3/2024 and TeamViewer still does not support automatic deletion of duplicates based on serial, etc. after a device wipes and gets teamviewer re-deployed to it. This will eat up your license count until you manually delete duplicates through the API ( which they do not support/offer any support even with corporate).

  • KBSKYW
    KBSKYW Posts: 1

    This still seems to be the case in 09/2024 :(