TFS Power Tools 2008 Powershell Snapin won’t run in on 64-bit in Windows 2008 R2?
-
Mittwoch, 18. August 2010 12:13Hello,
I've installed TFS Power Tools 2008 along with its PowerShell integration features on my Windows 2008 R2 developer machine.
When I try to run the following command to enable the snapin:
Add-PSSnapin Microsoft.TeamFoundation.PowerShell
in the 32-bit version of PowerShell.exe, under C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe it works fine. But when I try to do the same in the 64-bit version here:
C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe
I get the following error:
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.TeamFoundation.PowerShell' is not installed on this machine.
At line:1 char:13
+ Add-PSSnapin <<<< Microsoft.TeamFoundation.PowerShell
+ CategoryInfo : InvalidArgument: (Microsoft.TeamFoundation.PowerShell:String) [Add-PSSnapin], PSArgument Exception
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
Any idea how to make it work in the 64-bit version? Thanks in advance.
urig
Alle Antworten
-
Freitag, 20. August 2010 05:49Moderator
Hi urig,
PowerShell will load TFS SDK (suchan as Microsoft.TeamFoundation.PowerShell), then call it to do some operations, all TFS2008 SDK are target on X86. So if you install the PowerSheel sanpin on 64-bit OS, there will cause some errors.
I recommend you to install TFS 2010 power tools, which can also connect TFS 2008. You can download it from the following link:
http://visualstudiogallery.msdn.microsoft.com/en-us/3e8c9b68-6e39-4577-b9b7-78489b5cb1da
For more information, you can see http://richardberg.net/blog/2009/03/13/why-is-the-tfs-powershell-snapin-marked-32-bit-only/
Hope it helps!
If you have any cocern, please feel free to let me know!
Best Regards,
Cathy Kong
- Als Antwort markiert Cathy KongMicrosoft Contingent Staff, Moderator Montag, 23. August 2010 09:24
- Tag als Antwort aufgehoben Cathy KongMicrosoft Contingent Staff, Moderator Dienstag, 24. August 2010 02:57
-
Montag, 23. August 2010 11:33
Hi Cathy,
Thank you for your quick and detailed reply. I've followed your advice and installed TFS Power Tools 2010 but unfortunately this did not solve my problem. I still get the exact same error when trying to add the snap-in in the system32 (64-bit) version of PowerShell.exe.
Are you sure the PowerShell snap-in for TFS Power Tools 2010 can run under 64-bit? I see some anecdotal evidence to the contrary in the fact that their shortcut to "PowerShell Console" (under "Start Menu" > "Microsoft Team Foundation Server 2010 Power Tools") uses the 32-bit version: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\tfshell.psc1" -noexit -command ". 'C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\TFSSnapin.ps1
Thanks again, Uri GoldsteinPS - The reason I need to run the snap-in under 64-bit is that that's the only way I can run it alognside the Windows PowerShell Snap-In for IIS - which seems to only run on the 64-bit of PowerShell. Any idea for how I can get these two to run together?
urig -
Dienstag, 24. August 2010 09:21Moderator
Hi urig,
Thanks for your feedback!
The PowerShell Snap-in is stored in Registry.
The root cause is that the PowerTools installer is 32bit, on 64bit machine, it will write to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\PowerShellSnapIns, not to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns.
A work around is to add the item to the node as the attachment.
Please save the following content and save it as *.reg file and import to Registry(just double click the *.reg file, click OK double)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell]
"PowerShellVersion"="2.0"
"Vendor"="Microsoft Corporation"
"Description"="This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
"VendorIndirect"="Microsoft.TeamFoundation.PowerShell,Microsoft"
"DescriptionIndirect"="Microsoft.TeamFoundation.PowerShell,This is a PowerShell snap-in that includes the Team Foundation Server cmdlets."
"Version"="10.0.0.0"
"ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2010 Power Tools"
"AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2010 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll"
"CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"Hope it helps!
If you have any concern, please feel free to let me know!
Best Regards,
Cathy Kong
- Als Antwort markiert Uri Goldstein Donnerstag, 26. August 2010 15:14
-
Mittwoch, 25. August 2010 09:34Moderator
Hi urig,
Does the solution works for you?
If you have any concern, please feel free to let me know!
Best Regards,
Cathy Kong
-
Donnerstag, 26. August 2010 15:26
Hi Cathy,
The solution you gave me worked for me. I am now able to run both the TFS PowerTools snap-in and the Web Administration snap-in in the same 64-bit instance of PowerShell!
Thank you very much for the speedy and thorough resolution of this issue.
Kind Regards,
Uri Goldstein,
Tel Aviv, Israel
urig -
Freitag, 27. August 2010 02:14Moderator
Hi urig,
I am glad to here that your issue has been solved.
Best Regards,
Cathy Kong
-
Montag, 13. September 2010 19:25The .reg solution didn't work for me. The problem is C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\Microsoft.TeamFoundation.PowerTools.PowerShell.dll doesn't exist. The dll is in the 2008 directory, not the 2010 directory. At least on my computer, that's what I'm seeing.
-
Dienstag, 12. Oktober 2010 08:28Moderator
Hi charie,
When you install Team Foundation Server 2010 Power Tools, have you select the PowerShell Cmdlets item? By default, this item is not installed during install TFS 2010 Power Tools.
Hope it helps!
Best Regards,
Cathy Kong
-
Freitag, 13. Januar 2012 02:05
CAthy,
Your posts seem to be the only reasonable solution for this issue. However, I am unable to install the cmdlets on my 2008 R2 server with VS 2008 and VS 2010 installed. I get an error 1001. and the installation rolls back when I install the powertools with the cmdlets selected using custom install. I can install the powertools without the cmdlets fine. Any help here?
Thanks
Krams
-
Donnerstag, 29. März 2012 20:45
I had the same issue, and I just found the solution to it. I decided to post here because it may help others out...Its the same idea as Cathy's, just a different/straight forward approach.
http://nzbart.blogspot.com/2011/02/getting-tfs-power-tools-2010-working-on.html
or if the site is down...these steps are highlighted below
Execute the following line in your 64-bit powershell command prompt
copyHKLM:\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell HKLM:\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell-rthen
Add-PSSnapinMicrosoft.TeamFoundation.PowerShellThis just worked for me....make sure you have already installed the 2k8 powershell snapin
Woooohoooo
Akin
- Bearbeitet Akinzo Donnerstag, 29. März 2012 20:47

