How do I set up TFS PowerShell Snapin

瘦欲@ 提交于 2019-11-30 04:44:28

Any chance you are running on x64? On my x64 system the Microsoft.TeamFoundation.PowerShell snapin only shows up under the x86 flavor of PowerShell. Adding it as simple as:

PS> Add-PSSnapin Microsoft.TeamFoundation.PowerShell

I take it that you installed TF Power Tools October 2008 release. If so, then there is also a shortcut on the start menu for a PowerShell console file that you can fire up. That preloads the TF snapin.

While installing Visual Studio Team Foundation Server 2013 Update 2 Power Tools .msi, I found that I had to re-install and select Modify installation and enable the installation of PowerShell Cmdlets .

@Keith Hill's and @Blakomen's answers are both correct; this and more information is available in the help file.

Start/All Programs/Microsoft Team Foundation Server 2010 Power Tools/Help Windows PowerShell Cmdlets for Visual Studio Team System Team Foundation Server

Or simply

C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\Help\PowerShellCmdlets.mht

(Adjust as necessary for your install folder and version of Power Tools)

Note the following (from help Get-TfsItemHistory -full):

-Server <TeamFoundationServer>
    Identifies the Team Foundation Server. This option is required if the command
    is invoked from a directory that is not mapped to a workspace.

If you haven't used PowerShell at all yet, you may need to enable the execution of remote scripts to get the PowerShell console in the TF Power Tools Oct 2008 release to work. Open up a Powershell console and type in:

Set-ExecutionPolicy RemoteSigned
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!