Step 1: Create an api token in the Management Console
1) Click on your Username on the top right corner and click Edit Profile
2) Go to Apps and click Create script token
3) Give the token a name and select the parameter Computers & Contacts with the setting View entries and click Save.
4) This will generate the token. Please copy this token and save it for later.
Step 2: Run the export script in PowerShell ISE
1) Open PowerShell ISE as administrator and type the following code and press Enter
$jsonFile = "YOURPATH\Computers export.json" $csvFile = "YOURPATH\Computers export.csv" $tvAccessToken = read-host "Please type your token " $devicesResponse = Invoke-RestMethod -Uri "https://webapi.teamviewer.com/api/v1/devices?full_list=true" -Method Get -Headers @{authorization = "Bearer $tvAccessToken"} $devicesResponse.devices | ConvertTo-Json | Out-File $jsonFile $devicesResponse.devices | Export-Csv -Path $csvFile -Delimiter ',' -NoTypeInformation
📌Note: Don’t forget to replace YOURPATH with the path you want the export to be generated to.
2) It will ask you to enter your token. Please paste your token you have saved earlier and press Enter
3) You are done. The script will automatically generate the export in the folder you have selected as [YOURPATH].