Skip to content

Instantly share code, notes, and snippets.

@edwinf
Created May 27, 2012 01:54
Show Gist options
  • Save edwinf/2795888 to your computer and use it in GitHub Desktop.
Save edwinf/2795888 to your computer and use it in GitHub Desktop.
Powershell script to report TFS checkin history
Get-TfsItemHistory "$/PROJECTNAME" -Recurse -Version "D1/1/10~D12/31/10" | Sort CreationDate | Select ChangeSetId,Committer,Comment,CreationDate | Format-Table ChangeSetId,CreationDate,Committer,Comment -Auto -Wrap | out-file "full.txt"
Get-TfsItemHistory "$/PROJECTNAME" -Recurse -Version "D1/1/10~D12/31/10" | Sort CreationDate | % {"`nChangeSetId - $($_.ChangeSetId), $($_.Committer), $($_.CreationDate) `n"; $(Get-TfsChangeset $_.ChangeSetID).Changes | select-tfsitem | select path | Format-Table -Wrap -Auto} | out-file "fullWithPaths.txt"
Get-TfsItemHistory "$/PROJECTSOURCEROOT" -Recurse -Version "D1/1/10~D12/31/10" | Sort CreationDate | Select ChangeSetId,Committer,Comment,@{n='CreationDate';e={$_.CreationDate.ToShortDateString()}} | Group CreationDate | Foreach { "$($_.Name) - Total Checkins: $($_.Count)";$_.Group | group Committer | sort @{e={$_.Count};asc=$false},Name | Format-Table Count,Name -auto } | out-file groupedByDate.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment