Get Anydesk ID Script


I was trying to run the Community Script, Get Anydesk ID, also I have entered the subdomain of my SyncroMSP and created the custom field for Anydesk. After running the script it doesn’t produce any values, also tried to sync the Asset Data still nothing and the output it gives me is that Call-SyncroApi: success.

I would add ‘$anydeskid’ to the end of the script so you can see in the output if it’s finding what it’s supposed to. Also you can remove anything related to subdomain, syncro does that automatically now, so there’s no need to specify it.

I have managed to solve the problem now, I think the custom field is case sensitive, I have created a custom field Anydesk, but after changing with the same as in the script it works flawlessly.

Thanks. This just solved a problem for me. Have upper case letters in my custom asset field name and the platform variable would not work. Neither would hardcoding it with a lower case letters. I had to hard code it in with same case as the field name’s letters. This didn’t use to be a problem!

I have tried using this script and I followed all the recommendations but when I run the script it only populates the custom field with anydesk: It never gets the AnyDesk 9-digit id.
Is this still a good script to use or am I missing something?


here is mine, I took the one from the lib and tweaked it to be more reliable, seams to work most of the time, have a few issues with custom re-installs

$variable = Get-ChildItem -Path C:\ProgramData\AnyDesk* -Filter “system.conf” | Get-Content | Select-String
if (!$variable) {
$variable = Get-ChildItem -Path C:\ProgramData\AnyDesk\ad_** -Filter “system.conf” | Get-Content | Select-String

if ($variable) {

$variable = $variable -split “=”
$anydeskid = $variable | Select-String -Pattern \d\d\d\d\d\d\d\d
$anydeskid = “anydesk:” + $anydeskid

Write-Output $anydeskid
Set-Asset-Field -Name “AnyDesk” -Value $anydeskid
Log-Activity -Message “AnyDesk Backup Remote Setup Installed” -EventName “Anydesk”