Get-TfsItemHistory not working TFS 2010
The issue is that executing the below command returns nothing. I know there are items with a checkin date greater than 12/5/2010. If I change the -gt to -lt I get thousands of records as expected but the -gt does not work and I cannot figure out wth is going on.. All I want is a distinct list of individual files from the TFS that have been checked in with the status of Edit afte开发者_如何学Goer 12/5/2010 but I can't even get the -gt to work. Thoughts?
Running this command on the client which is Windows 7 x64. I have the October TFS Powershell CmdLets installed. TFS 2010 is installed on a Windows 2008 server.
Get-TfsItemHistory $/MyPath -recurse -all | where { $_.CheckinDate -gt (Get-Date).AddDays(-17)} | Select-TfsItem
I don't think CheckinDate is what you want to use here. Get-TfsItemHistory returns a list of changesets. CheckinDate is on the files.
Try CreationDate instead:
Get-TfsItemHistory $/MyPath -recurse -all | where { $_.CreationDate -gt (Get-Date).AddDays(-17)} | Select-TfsItem
精彩评论