I have recently been asked to automate tabcmd.exe execution in our organization and ended up with a PowerShell module (GitHub - oribesser/PSTableau: A PowerShell module for Tableau. Currently a wrapper to tabcmd ) that I hope would be useful to others. It addresses few of the challenges I encountered like security, command input/output and sessions management:
- It redirects tabcmd standard and error outputs to the appropriate PowerShell streams.
- It handles tabcmd session state by reading its tabcmd-sesion.xml file and creating a new session only when necessary.
- It uses a pre-encrypted user credential to generate the PSCredential object and pass it to tabcmd.
- It is transferable between environments, the environment specific settings are set outside of the code.
Hope someone would find it useful, any contributions/suggestions would be welcome.