PowerShell - Teamviewer ID readout
Hi,
at first this is NOT a question, this a quick an dirty but helpful script to readout and show the local ID of the remote access tool TeamViewer of a monitored systems.
I had this idea a couple of days bevor, after poking around with wrong or even not documented TeamViewer (TV) Target IDs of our external Satelites. To find this out you must know that the local TV-ID is stored in the registry in HEX.
1) create a **custom property** entry called **TEAMVIEWER-ID** at your target system or even upper in your structure.
2) put this custon property in the **System Details Report** Template. You can do that via
Service/Devices -> Report Settings -> Server Settings -> System Details.
3) set up a **Execute Script Monitor** on your target system - running PowerShell and copy this lines:
$mon.FireActions = $False
$mon.Details = "TeamViewer-ID"
$statID = $mon.GetStatID("TV-ID")
$mon.RecordStat($statID, 10.5)
$key = "HKLM:\SOFTWARE\TeamViewer"
$ID = (Get-ItemProperty -Path $key -Name ClientID).ClientID
$mon.SetComputerCustomPropByID(0, "TEAMVIEWER-ID", $ID)
$mon.SetMonitorStatus($mon.msOK)
4) Apply and runs it every hour or when ever you like.
The RegKey "HKLM:\SOFTWARE\TeamViewer" works only with TeamViewer Version 11,
diffent TeamViewer Version uses different RegKeys.
Good luck, mte