代码之家  ›  专栏  ›  技术社区  ›  TheSean

如何设置TFS PowerShell管理单元

  •  20
  • TheSean  · 技术社区  · 16 年前

    我已经安装了TFS Power Tools,正在尝试使用powershell管理单元,但我不知道如何设置它。当我查看install文件夹时,我只看到以下5个DLL。

    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中似乎只存在少量命令,这些命令目前对我没有用处。

    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...
    

    谢谢

    4 回复  |  直到 15 年前
        1
  •  37
  •   Keith Hill Keith Hill    16 年前

    您是否有可能在x64上运行?在我的x64系统上,Microsoft.TeamFoundation.PowerShell管理单元仅显示在x86版本的PowerShell下。添加它非常简单,如下所示:

    PS> Add-PSSnapin Microsoft.TeamFoundation.PowerShell
    

        2
  •  12
  •   Philip Beck    11 年前

    安装时 VisualStudio Team Foundation Server 2013更新2动力工具MSI ,我发现我必须重新安装并选择 修改 PowerShell cmdlet .

        3
  •  2
  •   TrueWill    15 年前

    @基思·希尔和@Blakomen的答案都是正确的;帮助文件中提供了此信息和更多信息。

    启动/所有程序/微软Team Foundation Server 2010动力工具/帮助 VisualStudioTeam StoundsTeam基金会服务器的Windows PubS壳CMDLeT

    或者干脆

    C:\程序文件(x86)\微软Team Foundation Server 2010动力工具\帮助\ PosiSeLCMCMelds.MHT

    请注意以下内容(摘自 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.
    
        4
  •  0
  •   Henry C    16 年前

    如果您尚未使用PowerShell,则可能需要启用远程脚本的执行,以使TF Power Tools 2008年10月版中的PowerShell控制台正常工作。打开Powershell控制台并键入:

    Set-ExecutionPolicy RemoteSigned
    
    推荐文章