I try to make some connection to an tfs server.
I must run this in the scheduler, so i need to provide the username and password.
As you can see. We use the tfspreview version. With username ( LIVE ID mailadres ) and password.
When i remove the password. It works. Username and password in cache? I removed cache in the local appdata!
When we try with the password. We get the following error.
TF30064: You are not authorized to access the server.
The code we use.
REM @echo off
REM ... Change the path below. This is the path where the code will be downloaded!
REM Z:
REM cd Backup_TFS_Preview
REM call %VS100COMNTOOLS%\..\..\VC\vcvarsall.bat x86
REM ... Navigate to folder
Z:
cd Backup_TFS_Preview
REM ... Makes folder with date today
mkdir %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%
REM ... Navigate to folder
cd %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%
REM ... Add workspace for the folder with date of today
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf" workspace /login:username(LiveID mail adres),password /new /server:https://*.tfspreview.com/DefaultCollection %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4% /noprompt
REM ... Get all items from TFS
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf" get /recursive /all /noprompt
REM ... Navigate to folder
cd ..
REM ... Zip the folder
C:\TFS_Backup_Scripts\7z.exe a %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%.zip %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%\
REM ... Remove folder
rmdir %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%\ /s /q
REM ... Delete workspace
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf" workspace /delete %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4% /noprompt
REM ... Navigate to folder
cd ..
cd ..
REM ... Delete zip files that are older then 10 days
forfiles -p "Z:\Backup_TFS_Preview" -s -m *.* -d -10 -c "cmd /c del /q @path"
PAUSE
Looks like you’re trying to connect to the tfspreview from the TF.EXE command of Visual Studio 2010, right ?
Even if you installed the QFE to enable TFSPreview access in Visual Studio be aware that this is mainly a “limited patch” and that TF.EXE is not fully compliant with TFSPreview.
You should install the VS11 beta and use the TF.EXE from this version, maybe you’ll be more lucky.
Btw I see you’re determined to create a schedule job to backup TFSPreview sources. You have to know that even if the platform is in preview state your whole Team Project Collection will be kept 3 months after the TFSPreview gets RTM and you’ll be notified several time of the possibility to:
Brian Keller from MS was very clear about that. So don’t be afraid to loose your code.
Update:
Comment from Brian Harry (one of the TFS Big bosses):
Feel free to contact Brian on his blog to ask him a confirmation, he always answers to people.