I would like to use PowerShell to automate the registration and registration of edited .csproj files in TFS. I only need to modify individual files pending and check them out.
Does anyone know how to do this?
You can check the New-TfsChangeSet and checkout using the Add-TfsPendingChange -Edit .
New-TfsChangeSet
Add-TfsPendingChange -Edit
To get the cmdlets, you need to install Power Tools Microsoft Team Foundation Server 2010.
I had the same pain as you had, and finally got to the right path. Here you go.
#Load the TFS powershell Add-PSSnapin Microsoft.TeamFoundation.PowerShell # the filePath should be in the format like C:\MyFodler\MyFile.txt Add-TfsPendingChange -Edit -Item $filepath -Verbose -ErrorAction SilentlyContinue -wa 0 # Check in the file after changes. New-TfsChangeset -Item $filepath -Verbose -Comment "Comment Here" -Override true