如何设置 TFS PowerShell 管理单元 [英] How do I set up TFS PowerShell Snapin
问题描述
我已经安装了 TFS Power Tools,我正在尝试使用 powershell 管理单元,但我不知道如何设置它.当我查看安装文件夹时,我只看到以下 5 个 dll.
I have installed TFS Power Tools and I am trying to use the powershell snapin, but I can't figure out how to set it up. When I look in the install folder, I only see the following 5 dlls.
Microsoft.TeamFoundation.PowerToys.Client.dll
Microsoft.TeamFoundation.PowerToys.Common.dll
Microsoft.TeamFoundation.PowerToys.Controls.dll
Microsoft.VisualStudio.TeamFoundation.PowerToys.Common.dll
Microsoft.VisualStudio.TeamFoundation.PowerToys.dll
我使用了 instalutil 来安装每一个,然后我使用以下 ps 代码查看安装了哪些 cmdlet,以便我可以添加管理单元,但看起来这些 dll 中只存在少数几个,这些命令对我没有用现在.
I used instalutil to install each one, and then I used the folowing ps code to see what cmdlets where installed so I could add the snapin but it looks like only a handfull exist in those dlls and these commands are not useful to me right now.
PS H:> get-pssnapin -registered
Name : TfsBPAPowerShellSnapIn
PSVersion : 1.0
Description : This is a PowerShell snap-in that includes Team Foundation Server cmdlets.
PS H:> get-command -pssnapin TfsBPAPowerShellSnapIn
CommandType Name Definition
----------- ---- ----------
Cmdlet Get-MsiProductId Get-MsiProductId [[-ProductIndex] <Int32>] [[-Mo...
Cmdlet Get-TfsDBServer Get-TfsDBServer [[-DBPath] <String>] [-Verbose] ...
Cmdlet Get-TfsHealthPing Get-TfsHealthPing [-Verbose] [-Debug] [-ErrorAct...
Cmdlet Get-TfsSqlData Get-TfsSqlData [[-ConnectionBuilder] <SqlConnect...
谢谢.
推荐答案
您是否有可能在 x64 上运行?在我的 x64 系统上,Microsoft.TeamFoundation.PowerShell 管理单元只出现在 x86 风格的 PowerShell 下.添加它就像:
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
我认为您安装了 TF Power Tools 2008 年 10 月版.如果是这样,那么开始菜单上还有一个可以启动的 PowerShell 控制台文件的快捷方式.这会预加载 TF 管理单元.
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.
这篇关于如何设置 TFS PowerShell 管理单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!