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.

  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell]
  4. "PowerShellVersion"="2.0"
  5. "Vendor"="Microsoft Corporation"
  6. "Description"="This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
  7. "VendorIndirect"="Microsoft.TeamFoundation.PowerShell,Microsoft"
  8. "DescriptionIndirect"="Microsoft.TeamFoundation.PowerShell,This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
  9. "Version"="11.0.0.0"
  10. "ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools"
  11. "AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
  12. "ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll"
  13. "CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"

Obvious, if you changed the TFS 2012 Power Tools installation directory from the defaults, you’ll have to update the .REG file.