views:

27

answers:

2

Hi, Is there a way to provide credentials to get latest files from TFS using TF.exe command line utility? My company was recently took over by another company. After acquisition, my machine was imaged as per new company's policy. I will be able to access the old company's domain over VPN. The TFS server belongs to old company's and accessible only over VPN. I have a MSBuild script which was working good before the take over. When I try executing it now, I get a message I am not authorized to access the TFS server even when I am connected to VPN.

When I try launching the Visual Studio, Team explorer prompts for user name/password. Is there a way to provide the credentials to the command line - similar to Visual Studio?

I appreciate the help.

Thanks.~/Ananth

+2  A: 

You can use "Run As..." when invoking the shortcut to the Visual Studio .Net 2008 Command Line - and from there, you should be fine.

Will A
I tried that but for some reason I get a message unknown user name or bad password. But still I want to accomplish using MSBuild scripts since I want to automate the build process. When I try MSBuild permission /login:<username>,<password> I see the same user name and password is authenticated by the TFS server. ~/Ananth
Ananth
+1  A: 

You can add the credentials to the Credential cache: http://www.ewaldhofman.nl/post/2009/05/21/Automatically-connect-to-TFS-under-another-user-account.aspx

Ewald Hofman