Point Deep

Mundeep's Tech Blog

View All Pending Changes in TFS

Posted by mundeep on May 16, 2008

To view all pending changes (checked out files) in TFS you need to do the following:

  1. Open a Visual Studio Command Prompt (or ensure that the “Microsoft Visual Studio 9.0\Common7\IDE” folder – usually in C:\Program Files – is available in your path).
  2. Change to the root directory of the project you want to search for pending changes (eg. C:\Projects\MyCustomProject)
  3. Run the following command:
    tf.exe status /r /user:*
  4. To output this to a text file (easier to read) simply add “> filename.txt” eg:
    tf.exe status /r /user:* > editedfiles.txt

One Response to “View All Pending Changes in TFS”

  1. Jeno Laszlo said

    if ((Get-PSSnapin -Name Microsoft.TeamFoundation.PowerShell -ErrorAction SilentlyContinue) -eq $null)
    Add-PSSnapin Microsoft.TeamFoundation.PowerShell

    $tfsCollectionUrl = “http://****/tfs/defaultcollection”
    $serverPath = “$/****/***”

    $tfs = Get-TfsServer -Name $tfsCollectionUrl
    $full = [Microsoft.TeamFoundation.VersionControl.Client.RecursionType]::Full

    $vcs = $tfs.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer])

    $pendingSets = $vcs.QueryPendingSets(@( $serverPath ), $full, $null, $null)

    $pendingSets | % { $_.PendingChanges } | Format-Table -AutoSize

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: