2010-12-17 57 views

回答

7

您可以使用New-TfsChangeSet cmdlet签入,并使用Add-TfsPendingChange -Edit cmdlet签出。

要获取cmdlet,您必须安装Microsoft Team Foundation Server 2010电动工具。

+1

您是否有指向该cmdlet文档的链接?我已经安装了Power Tools并更新了PowerGUI,目前它们还没有出现。 – StuperUser 2011-10-25 14:55:33

+0

在ps1中的任何完整的示例代码? – Kiquenet 2012-05-10 10:33:06

+1

@StuperUser:使用Bing我发现https://blogs.msdn.com/b/bharry/archive/2008/10/01/preview-of-the-next-tfs-power-tools-release.aspx?Redirected= true和https://rkeithhill.wordpress.com/2008/11/11/team-foundation-powershell-pssnapin-in-october-team-foundation-power-tools-drop/ – PVitt 2012-05-10 15:22:54

6

我也有同样的痛苦,最终走到了正确的道路上。 在这里,你去。

#Load the TFS powershell 
Add-PSSnapin Microsoft.TeamFoundation.PowerShell 
# the filePath should be in the format like C:\MyFodler\MyFile.txt 
Add-TfsPendingChange -Edit -Item $filepath -Verbose -ErrorAction SilentlyContinue -wa 0 
# Check in the file after changes. 
New-TfsChangeset -Item $filepath -Verbose -Comment "Comment Here" -Override true