param( [string] $changesets = $(throw 'Usage: Get-Changeset-Files 'changesets'))process{ # get TFS object $tfs = get-tfs ; # build up list of file items $fileItems = @(); $changesets.Split(',') | foreach { $tfs.vcs.GetChangeset($_).Changes | foreach { if($fileItems -notcontains $_.Item.ServerItem) { $fileItems += $_.Item.ServerItem; } } } return $fileItems | Sort-Object;}
Steps:
1. Create a file Get-Changeset-Files.ps1 and copy above code in the file (preferably where get-tfs resides). Also add this directory into your $path
2. Open Powershell, go to Directory where above file recides
3. Run 'Set-ExecutionPolicy unrestricted' so that you can run above cmdlet
4. Everything is ready.. just run for example: Get-Changeset-Files('10, 20, 30')
See here for get-tfs.ps1