---
schema_version: "1"
id: 68cccb94b93ca7a1c83209313c4d752f5d49df8e02778355f4e6f5c5a875f516
title: Automate Licensing Tasks
collection: tableau
version: next
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/next/en-gb/server/license_automating.md
canonical_url: https://help.tableau.com/v0.0/server/en-gb/license_automating.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 4e1cd19291b3becf79bc2e5bd779259a479ef315baa4df9147fd673d71583f66
description: Automate Tableau Server licensing tasks using command line tools and scripts.
---
[Skip to main content](#main-content)

# Automate Licensing Tasks

Several command line options allow you to perform common licensing tasks for Tableau Server using automated scripts.

If you want to perform these licensing tasks for Tableau Desktop using automated scripts, see [Deploy Tableau Desktop](https://help.tableau.com/current/desktopdeploy/en-gb/desktop_deploy_automate.htm) in the Desktop Deployment Guide.

## Command Line Tool Options and Better Script Automation

You can use a utility called `tabinstallck.exe` to script the activation, refresh and deactivation of server product keys. `tabinstallck.exe` is installed in the Tableau Server \\bin directory on the initial node. By default, this is:

`C:\Program Files\Tableau\Tableau Server\packages\bin.<version_code>`

You can also use `tsm licenses` to perform licensing tasks such as activating or deactivating a Tableau Server product key on- or off-line, and getting associated files for offline activation or deactivation. However, Tableau Server must already be deployed and configured. You can automate these licensing tasks using the [Tableau Services Manager API](http://onlinehelp.tableau.com/v0.0/api/tsm_api/en-gb/index.htm). In addition, `tabinstallck.exe` provides a way to script the licensing step for a new Tableau Server installation that is not completely configured.

To use `tabinstallck.exe`, you need to run the commands or script as an administrator on the primary Tableau Server node.

**Note**: `tabinstallck.exe` does not support offline activation and deactivation. To learn more, see [Activate Tableau Server Offline](https://help.tableau.com/v0.0/server/en-gb/activate_off.htm).

## Product key operations with forward proxy servers

If the computer where you are running Tableau Server has been configured to connect to the internet through a forward proxy, follow the procedure in the topic, [Configure Product Key Operations with Forward Proxy](https://help.tableau.com/v0.0/server/en-gb/activate_proxy.htm), before attempting to activate, refresh or deactivate product keys.

## Activate

Activate a Tableau Server licence using the `-activate` option:

start/wait tabinstallck.exe -activate <product\_key>

## Refresh

Refresh a Tableau Server licence using the `-refresh` option:

start/wait tabinstallck.exe -refresh <product\_key>

## Deactivate

Deactivate a Tableau Server licence using the `-return` option:

start/wait tabinstallck.exe -return <product\_key>

## Example

An example of a script to activate Tableau Server might look like this:

@echo off
start/wait tabinstallck.exe -activate <product\_key>
if %errorlevel% EQU 0 (ECHO SUCCESS) ELSE (ECHO FAILED)

## Error Handling

When you use `tabinstallck.exe` to automate Tableau Server licensing tasks, status information is returned as an exit code in the ERRORLEVEL environment variable. If activation was successful, the exit code is `0` (zero). The table below lists exit codes from the activation process and what they mean. You can also find error information in the `tabinstallck.log` file. This log file is located in the Tableau Server \\logs folder, by default:

`C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs\`

The ProgramData folder is hidden by default.

This example script shows how to activate Tableau Server and check for specific errors, such as an invalid product key (536871018) and general licensing issues (536871012).

@echo off
start/wait tabinstallck.exe -activate  _<product\_key>_
if %errorlevel% EQU 536871018 (ECHO TABLEAU\_ERROR\_LICENSING\_INVALID\_KEY)
if %errorlevel% EQU 536871012 (ECHO TABLEAU\_ERROR\_LICENCING\_GENERAL)
if %errorlevel% EQU 0 (ECHO SUCCESS)

<table class="simple-table"><colgroup><col><col><col></colgroup><tbody><tr><th>Exit Code</th><th>Message</th><th>Value</th></tr><tr><td><code>536871012</code></td><td><code>TABLEAU_ERROR_LICENSING_GENERAL</code></td><td>An unknown error occurred during the licensing operation.</td></tr><tr><td><code>536871013</code></td><td><code>TABLEAU_ERROR_LICENSING_INTERNAL</code></td><td>The product is unable to start due to an internal licensing error.</td></tr><tr><td><code>536871014</code></td><td><code>TABLEAU_ERROR_LICENSING_SETUP</code></td><td>The product is unable to start due to an internal licensing error.</td></tr><tr><td><code>536871015</code></td><td><code>TABLEAU_ERROR_LICENSING_CONNECT</code></td><td>An error occurred contacting the Tableau licence server.</td></tr><tr><td><code>536871017</code></td><td><code>TABLEAU_ERROR_LICENSING_ACTIVATION_ASR</code></td><td>An error occurred while activating the ASR.</td></tr><tr><td><code>536871016</code></td><td><code>TABLEAU_ERROR_LICENSING_ACTIVATION_GENERAL</code></td><td>Activation failed, please try again.</td></tr><tr><td><code>536871018</code></td><td><code>TABLEAU_ERROR_LICENSING_ACTIVATION_INVALID_KEY</code></td><td>Invalid product key.</td></tr><tr><td><code>536871019</code></td><td><code>TABLEAU_ERROR_LICENSING_ACTIVATION_OFFLINE</code></td><td>Unable to complete offline activation.</td></tr><tr><td><code>536871020</code></td><td><code>TABLEAU_ERROR_LICENSING_ACTIVATION_INVALID_MODEL</code></td><td>An error was returned from the licence server. Check the Tableau log file for more information.</td></tr><tr><td><code>536871021</code></td><td><code>TABLEAU_ERROR_LICENSING_ACTIVATION_MAX_REHOSTS</code></td><td>Failed to deactivate the licence because you have reached the limit of deactivations for this licence.</td></tr><tr><td><code>536871033</code></td><td><code>TABLEAU_ERROR_LICENSING_ACTIVATION_MAX_EXTRA_ACTIVATIONS</code></td><td>Failed to activate the licence because you have reached the limit of activations for this licence.</td></tr><tr><td><code>536871022</code></td><td><code>TABLEAU_ERROR_LICENSING_UNLICENSED_GENERAL</code></td><td>An unknown error occurred during the unlicensing operation. Check your product key or contact support.</td></tr><tr><td><code>536871023</code></td><td><code>TABLEAU_ERROR_LICENSING_UNLICENSED_NONE_FOUND</code></td><td>No licences found.</td></tr><tr><td><code>536871024</code></td><td><code>TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED</code></td><td>Only expired product keys were found.</td></tr><tr><td><code>536871025</code></td><td><code>TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_TRIAL</code></td><td>Your trial for this version has ended.</td></tr><tr><td><code>536871026</code></td><td><code>TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_SUBSCRIPTION</code></td><td>The product key is expired.</td></tr><tr><td><code>536871027</code></td><td><code>TABLEAU_ERROR_LICENSING_UNLICENSED_EXPIRED_MAINTENANCE</code></td><td>Maintenance has expired.</td></tr><tr><td><code>536871028</code></td><td><code>TABLEAU_ERROR_LICENSING_RESYNC_GENERAL</code></td><td>Your product keys could not be synchronised.</td></tr><tr><td><code>536871029</code></td><td><code>TABLEAU_ERROR_LICENSING_REGISTRATION_GENERAL</code></td><td>An error occurred during product registration.</td></tr><tr><td><code>536871030</code></td><td><code>TABLEAU_ERROR_LICENSING_SERVICE_INSTALL</code></td><td>An unknown error occurred during licensing operations.</td></tr><tr><td><code>536871031</code></td><td><code>TABLEAU_ERROR_LICENSING_SERVICE_UNINSTALL</code></td><td>An unknown error occurred during licensing operations.</td></tr><tr><td><code>536871032</code></td><td><code>TABLEAU_ERROR_LICENSING_SERVICE_NOT_PRESENT</code></td><td>The FLEXnet licensing service is not present on the system.</td></tr></tbody></table>