2 of 2 people found this helpful
Redirect input from your password file like:
tsm login -u %TAB_USER% <pfile.txt
get-content pfile.txt | . tsm login -u $TAB_USER
For future reference this article contains many of the things needed to write scripts with TSM including using CALL and password files.
Now available in Tableau Server 2019.2 beta 1 is a feature we call TSM Direct Access. If you are using the tsm CLI from the controller node, you will not be prompted for a password if you are a member of the TSM administrative group. The feature works on both Linux and Windows servers. Hopefully this addresses the issue brought up in this thread.
Please give it a try and submit beta feedback about how it works in your environment!