Is there a way to search TFS using PowerShell to find all changesets that contain some sub-string in the check-in comment? I'd like to see the individual files in all the changesets in one view. In my case I am searching for all changesets that contain a defect number e.g. 'D-12345'.
I tried the example as outlined here. But running ...
tf history $/MyCodeRepo/Trunk -r /noprompt /format:detailed | ? { $_.comment -like *D-12345* }
... gives me several errors:
- You must provide a value expression on the right-hand side of the '-like' operator.
- You must provide a value expression on the right-hand side of the '*' operator.
- Unexpected token 'D-12345*' in expression or statement.
I then tried putting quotes around the search string but that just returned no results.
I have TFS power tools installed and I know you can use searchcs to search by Comment but you have to open each changeset individually.
Any ideas how I can do this?
Thanks,