You can push the TeamViewer to your devices via command line. Here is how to proceed based on the OS of your devices.

This article applies to Corporate and Tensor license holders who want to deploy TeamViewer (version 15 or newer) on their devices.

How to assign a device via command line

  1. Open the CMD (Windows) or Terminal (macOS).
  2. Navigate to your TeamViewer installation folder.
  3. Enter the following command (indicated below) into the command line.
  4. Press Enter on your keyboard.
  5. (optional for Windows only) Type 
echo %errorlevel%

into the command line to verify if the process was successful:

  • If the assignment was successful, the value "0" should be returned to the command line.
  • Any other return value indicates a problem that occurred during the assignment. For more information, please refer to the Error codes section.

TeamViewer.exe assignment --id paste_your_assignment_id_here 

Example: 

TeamViewer.exe assignment --id 0001CoBBChARKJtw_okR6o_fJ7AisynpEigIACAfAgAJAOjwtNCVK_JiM5lVdgdfguSk-gQ= 

Prerequisites:

  • TeamViewer is already installed.
  • For TeamViewer full client, the option Start with macOS needs to be enabled.

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -assignment_id <ID>

Example:

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -assignment_id 0001CoBBChARKJtw_okR6o_fJ7AisynpEigIACAfAgAJAOjwtNCVK_JiM5lVdgdfguSk-gQ=

sudo /Applications/TeamViewer.app/Contents/Helpers/TeamViewer_Assignment -assignment_id paste_your_assignment_id_here

Example:

sudo /Applications/TeamViewer.app/Contents/Helpers/TeamViewer_Assignment -assignment_id 0001CoBBChARKJtw_okR6o_fJ7AisynpEigIACAfAgAJAOjwtNCVK_JiM5lVdgdfguSk-gQ=

sudo teamviewer assignment --id paste_your_assignment_id_here 

Example:

sudo teamviewer assignment --id 0001CoABChARKJtw_okR6o_fJ7AisynpEigIACAfAgAJAO4PLaOBrqNDgr6jwtNCVK_JiM5lVdgdfgYo3uQ3pGkAbX8bo_VqPw1Rt61-RLe9AKSwZ14uwOXtUN7FYflrHbWAqRKBF0h8V18ldMcVT1rLF

How to update/overwrite an assignment

If you have an assigned device already and execute the assignment via the command line again, the device assignment gets overwritten by the new one. Overwriting implies that the old assignment is deleted, and already assigned managers or policies will be lost.

Note: The TeamViewer policy "prevents removal of assignment" also prevents a new assignment on an already assigned device.