The TFS 2012 Power Tool installation only installs the TFS PowerShell Snap-In for the 32-bit flavor of PowerShell on an x64 machine. With nearly all developers running x64 machines, we miss the ability to script TFS access in the ultimate scripting language. Needing to script so TFS automation I went looking to see if we could get the TFS PowerShell Snap-In working with x64 PowerShell.
You have to love the internet because I found the answer for TFS Power Tools 2008 in three seconds. A quick trip to my registry and through my favorite text editor had me controlling TFS in my TFS pipeline and all was right with the world. Because I’ll forget how to do this on my next machine repave, I’ll post the registry file that will hook up the TFS PowerShell Snap-In into x64 PowerShell.
- Windows Registry Editor Version 5.00
- "Vendor"="Microsoft Corporation"
- "Description"="This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
- "DescriptionIndirect"="Microsoft.TeamFoundation.PowerShell,This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
- "ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools"
- "AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
- "ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll"
Obvious, if you changed the TFS 2012 Power Tools installation directory from the defaults, you’ll have to update the .REG file.