Teamviewer client id registry12/25/2023 ![]() ![]() Write-Output "Unable to retrieve TeamViewer Client ID, error was:`n$($_.Exception.Message)"Įdit: Added a try-catch statement to allow basic error handlingĬopy and paste this into your PowerShell terminal then type Get-TVClientID -Computer and you should get the clientID back. ![]() To retrieve just the ClientID value, use this: (Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\TeamViewer' -Name ClientID).ClientIDįinally, what you actually want is a function you can call easily, like this: Function Get-TVClientID -ErrorAction Stop ![]() ObjTextFile.You're most of the way there, all you're missing is a colon: Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\TeamViewer' -Name ClientID Set objTextFile = objFSO.OpenTextFile (strFileName, ForWriting, True) Set objFSO = CreateObject(“Scripting.FileSystemObject”) ‘ used for file operations StrFileName = strFolderName & “_” & EnvDomainName & “_” & ComputerName & “_” & UserName & “_” & dwTVID & “.txt” ‘ Save to userdomain, computername, username, teamviewerid to a text file with same name ‘ only save if we did get a TeamViewer ID WScript.Echo “User: ” & EnvDomainName & “\” & UserName With TeamViewer Remote, you can quickly view and screenshare your iOS device and deliver support to unattended Android devices, point of sale (POS) devices, kiosks, and digital signage. Set WshNetwork = WScript.CreateObject(“WScript.Network”) ‘ used for Networking object controlĬomputerName = UCase(WshNetwork.ComputerName)ĮnvDomainName = UCase( WshNetwork.UserDomain ) Supporting a network of distributed devices can be costly and time-consuming, especially when scaled globally. ‘ in case we dont get it first, try a second place (add more of theese “if sections” if other versions are used) ‘ client ID is placed in more than one place depending on version OReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwTVID StrKeyPath = “SOFTWARE\Wow6432Node\TeamViewer\Version7” StrComputer & “\root\default:StdRegProv”) ' Set to true/false for writing to consoleĬonst ForReading = 1, ForWriting = 2, ForAppending = 8 ' set this to where you want the files stored, make sure there is permission from clients to this no matter what user they are logged on with! teamviewer-id-script.vbsĬonst strFolderName = "\\fileserver\share\folder\" You can also download a text file with the vbs script to avoid formatting errors, just right click, select save as and rename to. optimizations could be done to not write to the file if allready done, only run with install, save to database, etc. So without further adue, here is the little script. Since the TeamViewer ID does not change for a machine, it could be just run on machines when the TeamViewer client is installed, but that is entirely up to you. would be quite simple.īut by creating a share with write permissions from everyone and pointing this script to it and placing it during login for all users in a domain, it would be easy to find a given machine or users TeamViewer ID. To change this to save into another system, database, etc. ![]() This script is a very simple example of how to fetch the ID on a machine from registry and save that together with current logged in user and machine name in text files. Since TeamViewer can be rolled out in an organization with the MSI package and sample vbs scripts from TeamViewer, I was asked if it would be hard to do a small VBScript to fetch the TeamViewer ID from theese machines and save it somewhere for the support staff to look up in. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |