使用 powershell 从 tfs 获取项目的最新版本 [英] Get Latest version of a project from tfs using powershell

查看:25
本文介绍了使用 powershell 从 tfs 获取项目的最新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Powershell 自动化我们的日常开发人员任务.我的 powershell 脚本已经完成了一半.

I am trying to automate our routine developer tasks using powershell. I am halfway through with my powershell script.

我想从 TFS 获取特定项目的最新版本.开发人员将可以访问 TFS 中的多个项目.在这些项目中,需要更新特定项目下的文件.

I want to get latest version of a particular project from TFS. Developer will have access to several project in TFS. Out of those projects, files under specific project needs to be updated.

我将在已设置 TFS 路径且开发人员有权访问 TFS 的开发人员机器上运行 powershell 脚本.我用谷歌搜索了一段时间,但没有得到答案.

I will be running powershell script on developer's machine where TFS path is already set and developer has permission to access TFS. I googled it for a while, but could not get the answer.

推荐答案

这里是我使用的方法:

1) 您必须安装 Microsoft Visual Studio Team Foundation Server 2012电动工具.您需要安装 Windows PowerShell cmdlet.

1) You have to install Microsoft Visual Studio Team Foundation Server 2012 Power Tools. you need to install the Windows PowerShell cmdlets.

  • Windows PowerShell cmdlet 需要安装 .NET Framework 3.5 Windows 功能.

  • The Windows PowerShell cmdlets need the .NET Framework 3.5 Windows Feature installed.

需要配置 Windows PowerShell 执行策略.受限执行政策不起作用.

Windows PowerShell Execution Policy needs to be configured. Restricted Execution Policy does not work.

2) 安装先决条件后,您可以使用版本控制.

2) After installing the prerequisites, you can use version control.

打开 Windows PowerShell 控制台,然后从 Visual Studio Team Foundation Server 2012 Power Tools 加载 Team Foundation cmdlet.

Open the Windows PowerShell console, and then load the Team Foundation cmdlets from the Visual Studio Team Foundation Server 2012 Power Tools.

Get-PSSnapin –Registered
Add-PSSnapin Microsoft.TeamFoundation.PowerShell

这篇关于使用 powershell 从 tfs 获取项目的最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆