2

I have am running tf checkin via powershell and this is working fine. When the command runs it is bringing up a TFS checkin window where i can set the comment, choose work items to associate etc and then click a button to confirm the check in.

However i wanted to get the output from the command and then work out what the changeset was so that i could do a tf merge with this changeset into another branch.

Attempts to get the output into a variable have resulted in the tf checkin no longer showing me the window prompt and then failing (due to not assigning a work item)

This is the code i have so far,

$myVar= $(tf checkin 2>&1 | tee Write-Host)

How do I both get it to continue to show the checkin window and save it's output when done into myVar?

4imble
  • 13,979
  • 15
  • 70
  • 125

0 Answers0