Read this article in  ChineseFrench | Japanese | Spanish


This article applies to all TeamViewer customers with a Corporate or Tensor subscription plan using version 14.x.

Supported macOS versions: 10.11, 10.12, 10.13, 10.14

This article explains how you can install, update, uninstall TeamViewer Host and TeamViewer Full in a mass deployment scenario on macOS.

Hint: It is not supported to provide settings within the installation process on macOS.

Hint: Silent rollouts are not yet possible on macOS

Installation

For macOS TeamViewer offers two installers:

  1. TeamViewer.pkg: will install the full version of TeamViewer
  2. TeamViewerHost.pkg: will install the (Custom) Host module of TeamViewer

Standard Host client

To install TeamViewer in a mass deployment scenario without user interaction, you need to use the following command from within your script, directly from the terminal or in your deployment solution:

  1. Type into the terminal: sudo installer -pkg "Install TeamViewerHost.pkg" -target /
    The parameter -target defines the path where you want your installation to be located.
    sudo installer -pkg "Install TeamViewerHost.pkg" -target /

Customized Host client

When you want to install a customized Host, you need to follow these steps:

  1. Create a new customization or open an existing on Management Console.

    How to customize your Host: Visit the Design & Deploy page to setup your customization within the TeamViewer Management Console. After you created the Host customization, a ConfigurationID will be generated. You can find it by clicking on edit for the corresponding module entry at the bottom of the opened page.
    massdeployment2.png

  2. Copy the ConfigurationID from your customized Host.
  3. Open the terminal or execute the pkg via a script.
  4. Add the ConfigurationID to the filename in the command line:
    sudo installer -pkg "Install TeamViewerHost-idc<ConfigurationID>.pkg" -target /

Summary of parameters

Parameter

Description

-idc

The Configuration ID is needed to install a Custom Host. It can't be used to configure a Full client installation. The ConfigurationID can be retrieved from the Management Console.

 

Full client

To install TeamViewer in a mass deployment scenario, you need to follow these steps:

  1. Open the terminal or execute pkg via a script.
  2. Type into the terminal: sudo installer -pkg "Install TeamViewer.pkg" -target /
    sudo installer -pkg "Install TeamViewer.pkg" -target /
    The parameter -target defines the path where you want your installation to be located.

Silent installation of a (Customized) Host client

Silent installation is only supported for the (Customized) Host at the moment. Support for the Full Client is planned though for the near future.

In order to install TeamViewer in a mass deployment scenario silently (unattended), you need to follow these steps:

  1. download the Host PKG package from the TeamViewer website:
    1. download TeamViewerHost.dmg
    2. If you downloaded the DMG file to a Windows machine, you can extract the PKG file from the DMG with the help of some ZIP tool (e.g. 7ZIP)
      1. The package "Install TeamViewerHost.pkg" can be found in the folder "...\TeamViewerHost.dmg\TeamViewerHost\" inside the DMG package
      2. if you downloaded the DMG package to a Mac, you can extract the "Install TeamViewerHost.pkg" package by double clicking on the DMG package. The macOS installer window will open and you can drag&drop the "Install TeamViewerHost.pkg" package directly to the desktop.
  2. generate an XML file called (e.g.: choices.xml) and enter the following content:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <array>
        <dict>
            <key>attributeSetting</key>
            <integer>1</integer>
            <key>choiceAttribute</key>
            <string>selected</string>
            <key>choiceIdentifier</key>
            <string>com.teamviewer.teamviewerhost14SilentInstaller</string>
        </dict>
    </array>
    </plist>

    the choiceIdentifier "com.teamviewer.teamviewerhost14SilentInstaller" is only valid for version 14 of teamviewer. The naming scheme might change for later versions.

  3. (optional) verify if your configuration will be applied correctly
    1. execute the following command:
      installer -showChoicesAfterApplyingChangesXML newChoices.xml -pkg Install\ TeamViewerHost.pkg -target /
    2. this will result in an output that should look similar to this:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <array>
          <dict>
              ...
          </dict>
          <dict>
              ...
          </dict>
          <dict>
              <key>attributeSetting</key>
              <false/>
              <key>choiceAttribute</key>
              <string>visible</string>
              <key>choiceIdentifier</key>
              <string>com.teamviewer.teamviewerhost14SilentInstaller</string>
          </dict>
          <dict>
              <key>attributeSetting</key>
              <true/>
              <key>choiceAttribute</key>
              <string>enabled</string>
              <key>choiceIdentifier</key>
              <string>com.teamviewer.teamviewerhost14SilentInstaller</string>
          </dict>
          <dict>
              <key>attributeSetting</key>
              <integer>1</integer>
              <key>choiceAttribute</key>
              <string>selected</string>
              <key>choiceIdentifier</key>
              <string>com.teamviewer.teamviewerhost14SilentInstaller</string>
          </dict>
      </array>
      </plist>
  4. apply the configuration during the installation by adding the parameter "-applyChoiceChangesXML <your_filename>.xml"
    1. example for a standard Host:
      sudo installer -applyChoiceChangesXML choices.xml -pkg Install\ TeamViewerHost.pkg -target /
    2. example for a Custom Host:
      sudo installer -applyChoiceChangesXML choices.xml -pkg "Install TeamViewerHost-idc<ConfigurationID>.pkg" -target /
  5. in case you want to rollout to macOS Mojave:
    1. Go to your MDM solution, e.g. Mobile Iron, JAMF Pro, VMWare or Mirador
    2. Configure your MDM to rollout the Accessibility permissions (according to the manual of your MDM solution provider)
      1. one example for a MDM configuration by using Mobile Iron can be found here: Add TeamViewer apps to macOS Mojave accessibility with Mobile Iron

Assign your Host or Full client to an account

Host

To assign your Host to an account, you have two possibilities:

  1. Customize your TeamViewer Host module in such a way, that the Host module is added automatically to a TeamViewer account. 
  2. Install TeamViewer as described above. Afterward, you can start the assignment process. Please read the Assignment section for further information.

Full

To assign your Full client to an account, you need to:

  1. Install TeamViewer as described above. Afterward, you can start the assignment process. Please see the Assignment section for further information.

Update of TeamViewer

Updating TeamView on macOS is like a normal installation. Thus you can completely refer to the section "Installation".

Uninstalling TeamViewer

You can uninstall your TeamViewer (e.g., if you want to switch from a host to a full version) only manually in two ways:

  1. (recommended) Download and install AppCleaner from the Mac App Store:
    1. Open AppCleaner and click the Finder icon.
    2. Click Applications in the left menu.
    3. Drag the TeamViewer application into AppCleaner.
    4. Click Remove.
    5. Enter your password and click OK.
    6. The program has been uninstalled.
  2. Drag the application from your Applications folder to the trash. If prompted, enter your password and click OK.

Assignment

TeamViewer must already be installed (and for the full client also the option "Start with system" must be enabled) before you can do the assignment on macOS. The assignment tool is installed with the application under /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment.

To do the assignment, follow these steps:

  1. (optional) Start the TeamViewer service process (only necessary if a user is logged in via ssh):
    sudo launchctl load /Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
     
  2. Run the assignment tool with sudo privileges on all devices that should be assigned. To do this in a mass deployment scenario, we advise you to use a script to call the assignment tool with the required parameters.
    1. Host version
      sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -group <GROUP> -alias <COMPUTERNAME> -grant-easy-access
    2. Custom Host Version
      sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token $YourToken -grant-easy-access
    3. Full version:
      sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <YOUR_APITOKEN>

If the assignment tool was executed successfully on a device, the device is assigned to the account that created the Custom TeamViewer Host module and easy access for the device is (optionally) activated.

Assignment options

The following table shows the possible options for the assignment (they are all optional). There are some parameters that need a value (–alias MyAlias) or do not need a value (–reassign). The options need to be added to the command line.

Option

Description

-api-token <TOKEN>

API Token in order to do the assignment to the correct account

-alias [<name>]

Alias for the new device in the computers & contacts list. If the device is already in the contact list, the alias will be overwritten. The parameter can take the following values:

  1. -alias (without value) → alias of the computer will be the teamviewerID
    sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -alias -group MyGroup
  2. -alias hallo → alias of the computer will be "hallo"
    sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -alias hello -group MyGroup
  3. alias parameter not specified → alias of this computer will be %computername%

    sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -group MyGroup

-grant-easy-access

If you set this option easy access is granted after assignment (same as the "Grant easy access" option in the TeamViewer main window).

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -grant-easy-access -group MyGroup

-reassign

Assigns the device to the account even if the device is already assigned to an account.

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -reassign -group MyGroup

-group <name>

Name of the group in which the device will be added. When the group doesn't exist it will be automatically created. If the device is already present in the computers & contacts list in a different group, it won't be moved to the group.

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -group MyGroup

Only required if no custom host is used, as there is already a default group defined in the custom configuration.

-group-id <ID>

This option is an alternative to use the -group parameter if the id of the group is known. This might be useful in very large customer environments as it speeds up the assignment process. Usually using -group is sufficient.
Note that the ID must be prepended with a literal "g".

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -group-id g123

wait <seconds>

With this parameter, the waiting time for the assignment can be specified in seconds. The default value of 30 (secs) should usually be sufficient.

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -wait 45 -group MyGroup

-proxy <name>:<port>

Url of your proxy (only for the assignment) in the format <name>:<port>, e. g. --proxy yourproxy:3201

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -proxy yourproxy:3201 -proxy-user FooBar -proxy-pw mypass -group MyGroup

(warning) URL without http://

-proxy-user <name>

<p">Username which is used for authentication against the proxy (only for the assignment). sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -proxy yourproxy:3201 -proxy-user FooBar -proxy-pw mypass -group MyGroup

-proxy-pw <password>

Password which is used for authentication against the proxy (only for the assignment).

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -proxy yourproxy:3201 -proxy-user FooBar -proxy-pw mypass -group MyGroup

-proxy-pw-base64 <encoded_password>

Same as --proxy-pw, but the password needs to be entered as a Base64 encoded string. Useful for passwords with special characters.

sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token <API TOKEN> -proxy yourproxy:3201 -proxy-user FooBar -proxy-pw-base64 bXlwYXNz -group MyGroup

 

Be careful: on macOS command line options must be used with - instead of --. Example: -alias (not --alias)

Help for assignment options

  • If you have parameter values with blanks (e.g. for the group name) use "<GROUP_NAME_WITH_BLANK>".
  • Parameter names are case sensitive
  • Proxy settings can be specified for the assignment within the ASSIGNMENTOPTIONS. There are additional proxy settings for the TeamViewer connection itself (as defined in the TeamViewer client options). These have to be set outside of the ASSIGNMENTOPTIONS.
  • You can also insert environment variables to your commands for installation/assignment to add dynamic values, e.g. for the alias. You can use environment variables by using $-notation. The following characters should not be contained in the variables: $, @, `, ´
    Example: 
    • group=Test -alias ="$group" works fine
      group=Test$ -alias="$group" - does not work
  • Variables should always be used within quotes.

    Example
    1. export GROUP="MyGroup"
    2. export ALIAS="MyDevicename"
    3. sudo /Applications/TeamViewer.app/Contents/Helpers/TeamViewer_Assignment -api-token <YOAPITOKEN> -group "$GROUP" -alias "$ALIAS"

Version history
Revision #:
29 of 29
Last update:
‎14 Jun 2019, 2:12 PM
Updated by: