tabcmd

Note: The tabcmd command-line utility version 2.0 is available at Tableau tabcmd(Link opens in a new window). This new version allows you to run tabcmd commands on MacOS and Linux, and to authenticate using personal access tokens (PATs). Version 2.0 is built on public endpoints available in the Python-based Tableau Server Client (TSC). This latest version has limited support for Tableau Server.

Tableau provides the tabcmd command-line utility which you can use to automate site administration tasks on your Tableau Server site. For example, creating or deleting users, projects, and groups.

Note: In Tableau versions prior to 2024.1, tabcmd version 1 does not work for exporting vizzes.

Note: The tabcmd utility is included with Tableau Server and is automatically installed on the server nodes. However, its installer is not included, so if you want to run tabcmd on computers that are not part of your Tableau Server installation, you need to download the installer from the Tableau website. For more information, see Install tabcmd below.

Install tabcmd

Note: These instructions are for installing the tabcmd 1.0 command-line utility. To install the tabcmd 2.0 command-line utility, go to Tableau tabcmd(Link opens in a new window) (new window).

When Tableau Server or Tableau Cloud is upgraded to a new version, if an updated version of tabcmd is required, you can download it from the Tableau Server Releases page on the Tableau website.

For Tableau Server, we recommend you download the version that matches your server version. For Tableau Cloud, we recommend you always download the latest version to avoid issues caused by version incompatibilities. In either case, using an out of date version of tabcmd can cause errors and unpredictable results.

  1. Open a web browser and go to the Tableau Server Releases(Link opens in a new window) page. Go to this page even if you use Tableau Online.

  2. If you're using:

    In either case, if the expanded information shows maintenance releases, select the latest maintenance release or the one that matches your server version.

    Select the server version you use (latest release for Tableau Cloud)

    This takes you to the release notes page, called Resolved Issues, where you can read about security improvements and resolved issues.

  3. Scroll to the Download Files section under the resolved issues, select the tabcmd download link that is compatible with the computer on which you’ll run the tabcmd commands. 

    Select the tabcmd installer for the computer you'll use it on (32- or 64-bit)

    The remaining steps refer to this computer as “the tabcmd computer.”

  4. Save the installer to the tabcmd computer, or a location accessible from that computer .

  5. Complete the installation steps as appropriate for the operating system of the tabcmd computer:

    • Windows
    • Linux

    To uninstall tabcmd from a Linux computer, see the documentation for the Linux variety you are running.

  6. (Optional) Add the fully qualified location where tabcmd is installed to your system path to allow you to run tabcmd commands without changing to that location, or specifying the location with each command. Steps to do this depend on the type and version of your operating system. For more information, see PATH_(variable).

How to use tabcmd

The basic steps for using tabcmd are as follows:

  1. Open the Command Prompt as an administrator.

    Note: Do not use PowerShell to run tabcmd commands on Windows. Using PowerShell can cause unexpected behavior.

  2. On a Windows computer, if you installed tabcmd on a computer other than the initial node, change to the directory where you installed tabcmd.

    On a Linux computer, you do not need to change to the install directory.

  3. Run the tabcmd command.

When you use tabcmd, you must establish an authenticated server session. The session identifies the server or Tableau Cloud site and the user running the session. You can start a session first, and then specify your command next, or you can start a session and execute a command all at once.

Important: If you are using tabcmd to perform more than one task, you must run tasks one after another (serially), rather than at the same time (in parallel).

Commands (such as login) and the options (such as -s, -u, etc.) are not case sensitive, but the values you provide (such as User@Example.com) are case sensitive.

Examples

The following command demonstrates starting a session with the Tableau Server named tabserver.mycompany.com:

tabcmd login -s http://tabserver.mycompany.com -u admin -p mypassword

The next example shows a command that deletes a workbook named Sales_Workbook:

tabcmd delete "Sales_Workbook" 

Here’s how to accomplish all of the above with one command—note that you do not need login here:

tabcmd delete "Sales_Workbook" -s http://tabserver.mycompany.com -u admin -p mypassword 

A Tableau Server can run multiple sites. When a workbook is on the Default site of a multi-site server you don't need to specify Default, the above command is sufficient. However, if the command applies to something on a site other than Default, you need to specify the site ID for that site (see login). Here's the same command for a workbook that's on the West Coast Sales site (site ID wsales):

tabcmd delete "Sales_Workbook" -s http://tabserver.mycompany.com -t wsales -u admin -p mypassword 

The options -s, -t, -u, and -p are among the tabcmd global variables, which can be used with any command.

For more information, see tabcmd Commands.

Status messages and logs

When a command is successful, tabcmd returns a status code of zero. A full error message for non-zero status codes is printed to stderr. In addition, informative or progress messages may be printed to stdout.

A full log named tabcmd.log that includes debugging, progress, and error messages is written to C:\Users\<username>\AppData\Local\Tableau\.