How do I set up TFS PowerShell Snapin

41,794

Solution 1

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 .

Solution 2

@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.
Share:
41,794
TheSean
Author by

TheSean

Updated on June 03, 2020

Comments

  • TheSean
    TheSean almost 4 years

    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
    

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

    thanks.

  • Rytmis
    Rytmis about 14 years
    You'll want to do that in a PowerShell instance that was launched with administrative privileges.
  • JamesQMurphy
    JamesQMurphy about 9 years
    For me, I actually had to Repair my installation. Took a while too... it appeared like it was hung. But it fixed it.
  • Rubio
    Rubio almost 7 years
    I tried re-install > Modify, no luck. The only program feature available is Best Practices Analyzer.