tacticalrmm/scripts/Win_AnyDesk_Get_Anynet_ID.ps1

16 lines
341 B
PowerShell

$Paths = @($Env:APPDATA, $Env:ProgramData, $Env:ALLUSERSPROFILE)
foreach ($Path in $Paths) {
If (Test-Path $Path\AnyDesk) {
$GoodPath = $Path
}
}
$ConfigPath = $GoodPath + "\AnyDesk\system.conf"
$ResultsIdSearch = Select-String -Path $ConfigPath -Pattern ad.anynet.id
$Result = @($ResultsIdSearch -split '=')
$Result[1]