3

When using the command-line version of TFS 2012, we call

TF.exe get $/Path/To/Team/Project/Some/Folder /recursive

And with that call from command line prompt, my command succeeded.

I do not put in any username/password for this call.

I want to change the user for this command but going for TF.exe /? give me no choice.

How can I change login account used for TF command-line?

Nam G VU
  • 33,193
  • 69
  • 233
  • 372

3 Answers3

5

The answer is here

TF.exe get /login:yourUsername,yourPassword ...

We can see manual for that from

TF get /?

Cheers

Nam G VU
  • 33,193
  • 69
  • 233
  • 372
2

Hit Shift + Right click on Visual Studio Command Prompt (in Start menu) and select Run as different user. Enter the user credentials when asked and it will open the command prompt and run as that user. After that you can run tf.exe command as that user.

You will have to make sure user has permission to the workspace for that folder. You can use Public workspaces to allow multiple users to use same workspace mappings.

Adarsh Shah
  • 6,755
  • 2
  • 25
  • 39
0

You can also use the runas command in DOS. http://technet.microsoft.com/en-us/library/bb490994.aspx

LeWoody
  • 3,593
  • 4
  • 25
  • 31
  • Can we have parameter for password for `runas` instead of waiting for the prompt? I need someway to write automation script. – Nam G VU Dec 26 '13 at 04:11