The cause for my issue is that the build agent execute my .bat file under a different Windows account which is something like NTSERVICE
; when I run it directly, my TFS login account was used (which was previously remembered in Windows 7 Credential Manager)
So the solution is to put in the login name and password as TF get /login:SomeTFSUsername,SomePassword
(see more here)