title: Expand output of TF.exe results from PowerShell
body: <p>I converted a batch file to PowerShell that queried a TFS location to return the latest changesets and display them in a log file.  This is an edited version of that file:</p>
  
  <pre>function Get-TfsChangeset([string]$TfsPath, [int]$PreviousDays = 1)
  {
      $TfExePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"
      Write-Output "Getting history for '$TfsPath'..."
      Push-Location $LocalPath
      $Today = Get-Date
      $Prior = $Today.AddDays(-$PreviousDays)
      & "$TfExePath" history /recursive /format:brief /noprompt /version:D$($Prior.Month)/$($Prior.Day)/$($Prior.Year)~D$($Today.Month)/$($Today.Day)/$($Today.Year) $TfsPath
      Pop-Location
      Write-Output "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Done ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`n"
  }
  
  $ReportLogPath = "C:\temp\TfsHistoryReport.log"
  
  Get-TfsChangeset "$/Some/Branch" > $ReportLogPath
  
  Write-Output "Opening log '$ReportLogPath'..."
  Start-Process notepad $ReportLogPath</pre>
  
  <p>However, the text returned from TF.EXE GET is cut off:</p>
  
  <pre>=========================== Started: 11/22/2011 09:43:31 =========================
  
  Getting history for '$/Some/Branch'...
  Changeset User          Date       Comment
  --------- ------------- ---------- --------------------------------------------
  12345     ...adis       11/21/2011 Invalid code in the tags.  Need to fix this
  12346     joe.blow      11/21/2011 Bug#1: Nothing is working so fix it right n
  12347     john.smith    11/21/2011 Bug#2: I don't like the new UI changes so f
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Done ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  =========================== Completed: 11/22/2011 09:43:42 =======================
  </pre>
  
  <p>I was able to get around it in the batch file by setting the console columns wide like this:</p>
  
  <p><code>mode con cols=250</code></p>
  
  <p>But I'm not sure how to do that in PowerShell.  </p>
  
  <p>Any ideas?</p>