3 Replies Latest reply on Aug 20, 2015 7:19 AM by Chris Sommers

# Can you use tabcmd with active directory?

Hello everyone,

I'm attempting to set up an automated batch process that will use tabcmd to login to the Tableau server and start up extract refreshes.  The concern I have is openly leaving the account password in the script.  Is there anyway to utilize active directory so that the password is automatically taken in?  Thereby negating the need to explicitly define the username and/or password altogether.  Any thoughts are appreciated.

Thanks,

Glen

• ###### 1. Re: Can you use tabcmd with active directory?

I've seen people do it this way... --password-file pwd.txt

But to do this your password text file needs to be in the same directory as your batch file.

• ###### 2. Re: Can you use tabcmd with active directory?

You can also use windows encryption to encrypt the password file. If a user encrypts the password file, the script can use the same logged-in user's credentials to decrypt the password file for inclusion in the tabcmd command without the user having to enter them each time, or store them permanently in plain text. Here is some powershell that decrypts the password:

$username = "username"$encrypted = Get-Content "C:\path\to\tableaufiles\encrypted_password.txt" | ConvertTo-SecureString
$credential = New-Object System.Management.Automation.PsCredential($username, $encrypted)$pw = $credential.GetNetworkCredential().Password #$pw contains the decrypted password that can be passed in the tabcmd command string