DEVICE_NAME in Syncro isn't getting new Hostname

I have a customer that has me rename the hostname for the person who’s assigned to the PC. So when I provisioned the PC into Syncro, it was LISA, but today it’s CINDY. Does anyone have a script that can change the name in Syncro’s asset page: DEVICE_NAME as well as the PC name when you hover over my clock icon? They are both still showing LISA.

I found out how to change the tray icon hover name in the registry:
Then restart the Syncro Service (or reboot)

Here’s script to do it:

$VarHostName = hostname
$VarHostName = $VarHostName.ToUpper()
Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\RepairTech\Syncro -Name OwnerName -Value $VarHostName
Restart-Service -Name Syncro

Now how to re-sync and change the DEVICE_NAME.

Syncro will sync the device name every 6 hours, just have to be patient. You don’t need to do change the hover name, it will update automatically too.

Tray icon hover usually changes. A few I’ve found never do, so I added the registry change to my rename script.

Import-Module $env:SyncroModule -WarningAction SilentlyContinue

# Check if computer is domain joined
if ((Get-WmiObject -Class Win32_ComputerSystem).PartOfDomain) {
    $username = (Get-WmiObject Win32_ComputerSystem).Domain+"\$DomainAdminUserName"
    $password = ConvertTo-SecureString -String "$DomainAdminPassword" -AsPlainText -Force
    $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password
    Rename-Computer -NewName "$NewName" -DomainCredential $credential
else {
    Rename-Computer -newname "$NewName"

Set-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\RepairTech\Syncro -Name "OwnerName" -Value "$NewName"

# Restart the computer for rename to take effect
if ($ToRestartTypeY -eq 'y') {
    Restart-Computer -Force

1 Like

More than 24hrs later and the hover name and the DEVICE_NAME (Under assets) is still the old name.

Hi Drew, if you hop into Backgrounding Tools from the Asset Detail page, you can restart the Syncro service. Give that a go then see if updates with the new asset name.

I’ve done that. I’m posting a picture to clarify:

I think DEVICE_NAME might be legacy at this point. ‘General Name’ is the new column you probably want.

Ahh ok that one, I did a little more digging. Our agent captures the device name only at the initial creation. Any further updates to the device name will not automatically update the device’s name in Syncro. If you edit the asset and give it a friendly name it will point to that instead if you absolutely need it updated.

Do you mean the DEVICE_NAME field specifically? Cause that’s not true in general, normally it updates just fine at the next sync.

You’ve got hostname and friendly name in System Info. I believe device_name is pointing to the friendly name, and general name is the hostname. However, there is nothing called device_name in the system info tab, I think it used to be listed but changed when the UI was updated. I suspect it may initially capture the general name but then never updates. In this case, you may want to try the general name column if you don’t use friendly names.

Remove that column. That is no longer used per Alexandria. I don’t even use that column.