By now, most of us have utilized the tableau-server-obliterate.cmd script that comes with version 2018.2 and beyond (if you haven’t, you are about to find out what that is). But what do the rest of those built-in scripts do!?
These are, by default, located under the C:\Program Files\Tableau\Tableau Server\Packages\Scripts <version>\ folder. If you navigate via command line to that directory, you can run any one of the scripts. Let’s walk through them one by one:
Disable-coordination-service-authentication
Usage: disable-coordination-service-authentication.cmd -y -y -y
Use Case: When troubleshooting with Tableau Support
- This tool is for recovery from error conditions and should not be used unless instructed by technical support.
- It disables the internally used authentication scheme to access Tableau Server Coordination Service.
- This script must be run as the Administrator. The server node on which this script is run must have the correct credentials to authenticate with Tableau Server Coordination Service in its current state. If unsure, you can try running this script from each one of your nodes until one of them succeeds.
Local-configuration
Usage: local-configuration.cmd get -k <configuration>
Use Case: To determine the setting of any configuration set for your Tableau Server. The list of options can be found here.
- Example: local-configuration.cmd get -k features.DesktopReporting
- This tool allows you to grab the value of any configuration set for Tableau Server using the corresponding key.
Move-tsm-controller
Usage: move-tsm-controller.cmd -n <node-id>
Use Case: If your initial node fails, you will need to run this command first from one of your additional nodes. After you have successfully moved your TSM controller to another node, you may utilize TSM commands to reconfigure your topology and add your licensing service. You will need to reactivate your license in an initial node failover scenario.
- This tool is for moving the TSM Controller to the specified node.
- The service will be stopped, if running, and unavailable during the move. It will be restarted on the specified node after the move is completed.
- This script can be run from any node in the Tableau Server cluster.
Refresh-environment-variables
Usage: refresh-environment-variables.cmd
Use Case: This is called from within the other scripts to grab the up-to-date environment variable to ensure the scripts are utilizing the correct paths and version number.
- It updates the local copy of the TABLEAU_SERVER_* environment variables from the registry.
- This queries the existing settings in the registry and sets if found, if not found the environment variable is cleared.
- It looks for four entries:
- TABLEAU_SERVER_CONFIG_NAME
- TABLEAU_SERVER_DATA_DIR
- TABLEAU_SERVER_DATA_DIR_VERSION
- TABLEAU_SERVER_INSTALL_DIR
Start-administrative-services
Usage: start-administrative-services.cmd
Use Case: If you find TSM or any of the TSM services are unavailable, this will make sure all necessary services are running.
- This tool is for starting all TSM administrative services.
- The services started are:
- Tableau Server License Manager
- Tableau Server Service Manager (tabsvc)
- Tableau Server Administration Controller
- Tableau Server Administration Agent
- Tableau Server Coordination Service (zookeeper)
- Tableau Server Client File Service
Stop-administrative-services
Usage: stop-administrative-services.cmd
Use Case: If you need to restart all TSM services, you can utilize this in conjunction with start-administrative-services.
- This tool is for stopping all TSM administrative services.
- The services stopped are:
- Tableau Server License Manager
- Tableau Server Service Manager (tabsvc)
- Tableau Server Administration Controller
- Tableau Server Administration Agent
- Tableau Server Coordination Service (zookeeper)
- Tableau Server Client File Service
Tableau-server-obliterate
Usage: tableau-server-obliterate.cmd [-q] [-l] -y -y -y
Use Case: To completely remove ALL Tableau Server instances and files from the server; good for a clean slate.
- This script will stop/kill any running Tableau Server processes and remove all Server-related files. No data or configuration is retained except files related to licensing. This is destructive to all data pertaining to Tableau Server and should only be used to clean the machine.
- If you have a cluster environment, you must run this on every node in the cluster.
- This script must be run as the Administrator.
- This script will:
- Deactivate License fulfillment key
- Stop and Remove TSM services
- Silently uninstall packages
- Delete the data directory
- Remove the Tableau Server Manager Certificates
- Remove the environment variables from the Registry
- You have the options:
- -y = Yes, perform this action. Must be specified three times to confirm the action is desired.
- -q = Quiet mode. Do not display progress UI when uninstalling Tableau Server packages.
- -l = Also delete licensing files and data. This command will attempt to deactivate licenses before deleting licenses. If in doubt, please use tsm licenses deactivate before running this script.
Upgrade-tsm
Usage: upgrade-tsm.cmd
Use Case: Use during the upgrade process from version 2018.2+, and this will point TSM to the new installed version of Tableau Server.
- Example: upgrade-tsm.cmd
- Performs upgrade using the backup file in the environment variable Tableau_Server_Data_Dir for restore
- Example: upgrade-tsm.cmd –backup-path <filepath>
- Performs upgrade using the specified backup file for restore
- Parameters:
- -u, –username <USER>
- TSM administrator user name
- -p, –password <PASSWORD>
- TSM administrator password
- -sp, –service-runas-password <PASSWORD>
- Service runas user password
- You will be prompted to run this script from the upgrade wizard when performing the upgrade.
- Tableau Server must be stopped prior to running this command.
- Will grab the pg_version to be installed from the pgsql package to be installed.
- -u, –username <USER>