This project is read-only.



The Set-Merge CmdLet enables to merge 2 branches together.

Obtain the TFS server using the Get-TFS CmdLet.


Name Description Example
-tfs TFS server obtained using Get-TFS $tfs = Get-TFS -url http://address:8080
-projectName Project name
-source Source branch $/test/dev
-target Target branch $/test/main
-description Merge description
-RecursionType Recursion type (Full, OneLevel, None)
-mergeoption Merge option (AlwaysAcceptMine, Baseless, ForceMerge, NoMerge, None


Windows PowerShell
PowerShell for Team System
By Noham Choulant

PsTFS > : $tfs = tfs colmar

PsTFS > : Set-Merge -TFS $tfs -ProjectName MyDemo -Source $/MyDemo/Main -Target $/MyDemo/Dev -Description "Merge Main Dev" -RecursionType Full -MergeOptions None
Getting: c:\temp\MergeTFSPsTFS\Target, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Source, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Target\All Tasks.wiq, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Target\MyHost.cs, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Target\TemplateStorageMetadata.xml, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Target\WebPart1.cs, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Source\All Tasks.wiq, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Source\MyHost.cs, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Source\readme.html, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Source\TemplateStorageMetadata.xml, status: Getting
Getting: c:\temp\MergeTFSPsTFS\Source\WebPart1.cs, status: Getting
Number conflicts : 0
Number failures : 0
Number operations : 1
Number warnings : 0


Your current pending changes:
  path: c:\temp\MergeTFSPsTFS\Target\readme.html, change: merge, branch
Checking in c:\temp\MergeTFSPsTFS\Target\readme.html

Checked in changeset 36
Get-TFSMerge is end

Last edited Nov 8, 2009 at 11:34 AM by pc152, version 5


caveman_dick Apr 8, 2010 at 6:12 PM 
Not sure if this is possible but it would be nice to have a "preview" feature with this command. Also what does the "NoMerge" option do?