TABCMD – Not enough permissions


So recently I was publishing some datasets to my Tableau server using PowerShell and received the below strange error message:


Here’s the command I was using:

tabcmd publish $publishFile
               -t $SiteName -r $ProjectName -u $username -p $password


The problem was the data source already existed on the server and I hadn’t specified -o to overwrite. So here’s the command that worked for me:

tabcmd publish $publishFile
               -t $SiteName -r $ProjectName -u $username -p $password -o

Publishing To Tableau Server with PowerShell


Hi All!

Time for a useful little piece of PowerShell code for publishing your Tableau workbooks or data sets to a server. Tabcmd won’t connect to Tableau in PowerShell unless you provide a password in the script, so I’ve added in a little script courtesy of Jamie Thompson (which you can find here). This script will allow you to specify the folder containing the files you want to upload to your server, along with the site name and project and then it will publish them for you. You can change the -Include section to uploade other kinds of files to your Tableau server.

$username = Read-host "Please Enter Username: "
$response = Read-host "Please Enter Password: " -AsSecureString
$password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($response))

$ReleaseFolder = "C:\Users\jim\Release"
$SiteName = "Samples"
$ProjectName = "default"
$publishFile = ""

ForEach($item in (Get-ChildItem -Path ($ReleaseFolder + "\*") -File -Include *.tdsx))

   $publishFile = """$item"""
   tabcmd publish $publishFile -t $SiteName -r $ProjectName -u $username -p $password

I hope you find it as useful as I have!