The full version of TeamViewer on Windows can run command line parameters that initiate a session to a remote device using a pre-set ID, password, and connection mode.
You can use these parameters to run TeamViewer from the Command Prompt, a script (for example, a .bat file), or a shortcut on your Desktop or Start menu.
How to use Command-line parameters
Parameters with and without a value
Note: Some parameters are only available with the TeamViewer (Classic) version 13.2.
There are two types of parameters, with a value and without a value.
Example for a parameter without a value:
TeamViewer.exe --noInstallation
Example for a parameter with a value:
TeamViewer.exe --id 123456789
In most cases, only one value is expected; if multiple are given, only the first one is used.
If the value of a parameter contains a space, the value must be enclosed in quotation marks.
Notes:
- A long parameter is called like this (with two “-“ -> “--“):
TeamViewer.exe --minimize
- If the parameter has a short variant, it can also be called with only one “-“:
TeamViewer.exe -n
- Windows
- Linux
Start session command
The Start session command allows you to launch a remote connection directly from the command line in TeamViewer. This is useful for automation, scripting, or quickly connecting without opening the full user interface. Depending on your setup, authentication can happen automatically or require a password.
Examples
// Remote Control
TeamViewer.exe -i ID -p PASSWORD
// File Transfer
TeamViewer.exe -i ID -p PASSWORD -m fileTransfer
// VPN
TeamViewer.exe -i ID -p PASSWORD -m vpn
ID
-i | --id ID
Starts a connection to the given partner ID. This is not an optional parameter.
Password or Passwordb64
-p | --password PASSWORD
Used in combination with "id". Password to use for the connection.
-b | --passwordb64 PASSWORDBASE64
Used in combination with "id". Base64-encoded password to use for the connection.
This parameter is optional, and when omitted, Easy Access permission would be used if available. Otherwise, you get prompted for the password.
Mode
-m | --mode MODE
Used in combination with "id". Connection mode to use for the connection.
If omitted, the remote control is used.
- Only supported on Windows with connections to Windows or Linux device.
Example:
--mode fileTransfer
Quality
-q | --quality N
Used in combination with "id". Connection quality setting to use for the connection.
To select a quality option, enter the desired option's N value after the quality flag, separated by a space. The default value is determined from your policies and machine settings. Example:
-q 2 | --quality 2
Access Control
-a | --ac N
Used in combination with "id". Access control rights to use for the (outgoing) connection.
To select an access control option, enter the value of N of the desired option after the ac flag, separated by a space. The default value is determined from your policies and machine settings.
Note: When using the custom parameter, the previous custom outgoing access control values will be applied. Example:
-a 1 | --ac 1
Application
The following options are supported:
Note: Please find the Parameter and short variant on the first line, with the description for each beneath.
Minimize
Start TeamViewer minimized. If "Start TeamViewer with Windows" is enabled, TeamViewer will be started in the tray instead.
Example:
TeamViewer.exe --minimize
play
Play a TeamViewer session file (*.tvs)
Example:
TeamViewer.exe --play C:Users\shvarts\Desktop\A\abc.tvs
control
Start a connection (RC/Meeting) to an ID specified in the given control file (*.tvc)
Where to find .tvc files:
-
%appdata%\TeamViewer\MRU\RemoteSupport
-
%appdata%\TeamViewer\MRU\Meeting
Example:
TeamViewer.exe --control C:\Users\shvarts\Desktop\A\abc.tvc
ProxyIP
Proxy IP and Port, formatted like: IPAddress:Port
Example:
TeamViewer.exe --ProxyIP 192.168.0.2:8080
ProxyUser
Used in combination with "ProxyIP". Proxy Username.
Example:
TeamViewer.exe --ProxyIP 192.168.0.2:8080 --ProxyUser admin
ProxyPassword
Used in combination with "ProxyIP". Proxy Password Base64 encoded.
Example:
TeamViewer.exe --ProxyIP 192.168.0.2:8080 --ProxyUser admin --ProxyPassword test
sendto
Send a list of files to a partner in your partner list. Prompts may open for login and recipient selection.
Examples:
Single file:
TeamViewer.exe --Sendto C:\Users\shvarts\Desktop\A\abc.jpg
Multiple files:
TeamViewer.exe --Sendto C:\Users\shvarts\Desktop\A\abc.jpg C:\Users\shvarts\Desktop\A\abcd.jpg
COM API
On Windows, the COM API could be used like this:
TeamViewer.exe api <options>
How to verify a successful installation
Via logfile
Open the TeamViewer logfile from %appdata%\TeamViewer and find the following entries:
CommandLineTasks: initializing... CommandLineTasks: installing COM-API API: Installing API ... API: ... successfully installed, calling SignalServiceParamChange ... API: ... SignalServiceParamChange finished CommandLineTasks: installing COM-API successful CommandLineTasks: finished
Via Windows PowerShell
Use the following PowerShell commands:
$tv = new-object -com TeamViewer.Application $tv.ApiVersion
Verify that any version will be written in Windows PowerShell, for example:
How to verify successful uninstallation
Via logfile
Open the TeamViewer logfile from %appdata%\TeamViewer and find the following entries:
CommandLineTasks: initializing... CommandLineTasks: uninstalling COM-API API: Uninstalling API ... API: ... successfully uninstalled, calling SignalServiceParamChange ... API: ... SignalServiceParamChange finished CommandLineTasks: uninstalling COM-API successful CommandLineTasks: finished
Via Windows PowerShell
Use the following PowerShell commands:
$tv = new-object -com TeamViewer.Application
Verify that an error will be printed in PowerShell.
Start session command
The Start session command allows you to launch a remote connection directly from the command line in TeamViewer. This is useful for automation, scripting, or quickly connecting without opening the full user interface. Depending on your setup, authentication can happen automatically or require a password.
Examples
// Remote Control TeamViewer -i ID -p PASSWORD // File Transfer TeamViewer -i ID -p PASSWORD -m fileTransfer
ID
-i | --id ID
Starts a connection to the given partner ID. This is not an optional parameter.
Password or Passwordb64
-p | --password PASSWORD
Used in combination with "id". Password to use for the connection.
-b | --passwordb64 PASSWORDBASE64
Used in combination with "id". Base64-encoded password to use for the connection.
This parameter is optional, and when omitted, Easy Access permission would be used if available. Otherwise, you get prompted for the password
Mode
-m | --mode MODE
Used in combination with "id". Connection mode to use for the connection.
If omitted, remote control is used.
Quality
-q | --quality N
Used in combination with "id". Connection quality setting to use for the connection.
To select a quality option, enter the desired option's N value after the quality flag, separated by a space. The default value is determined from your policies and machine settings.
Example:
-q 2 | --quality 2
Access Control
-a | --ac N
Used in combination with "id". Access control rights to use for the (outgoing) connection.
To select an access control option, enter the value of N of the desired option after the ac flag, separated by a space. The default value is determined from your policies and machine settings.
Note: When using the custom parameter, the previous custom outgoing access control values will be applied.
Example:
-a 1 | --ac 1