Assign a device via command line - 8/10
How to assign a device via command line
- Open the CMD.
- Navigate to your TeamViewer installation folder.
- Enter the following command (indicated below) into the command line.
- Press Enter on your keyboard.
- (optional) 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.
Windows
TeamViewer.exe assignment --id paste_your_assignment_id_here
Example:
TeamViewer.exe assignment --id 0001CoBBChARKJtw_okR6o_fJ7AisynpEigIACAfAgAJAOjwtNCVK_JiM5lVdgdfguSk-gQ=
macOS
Host module
sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -assignment_id paste_your_assignment_id_here
Example:
sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -assignment_id 0001CoBBChARKJtw_okR6o_fJ7AisynpEigIACAfAgAJAOjwtNCVK_JiM5lVdgdfguSk-gQ=
Full client
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=
Linux
sudo teamviewer assignment --id paste_your_assignment_id_here
Example:
sudo teamviewer assignment --id 0001CoABChARKJtw_okR6o_fJ7AisynpEigIACAfAgAJAO4PLaOBrqNDgr6jwtNCVK_JiM5lVdgdfgYo3uQ3pGkAbX8bo_VqPw1Rt61-RLe9AKSwZ14uwOXtUN7FYflrHbWAqRKBF0h8V18ldMcVT1rLFedyWVafv1zlRWmVZRKH3IAEQouSk-gQ=
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.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article