TFS Power Tools 2008 Powershell Snapin将无法在Windows 2008 R2中的64位上运行 [英] TFS Power Tools 2008 Powershell Snapin won't run in on 64-bit in Windows 2008 R2
问题描述
我已经在Windows 2008 R2开发人员计算机上安装了TFS Power Tools 2008及其PowerShell集成功能.
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
在PowerShell.exe的32位版本中,在 C:\ Windows \ SysWOW64 \ WindowsPowerShell \ v1.0 \ powershell.exe 下,它可以正常工作.但是,当我尝试在此处的64位版本中执行相同操作时: C:\ Windows \ system32 \ WindowsPowerShell \ v1.0 \ powershell.exe ,我得到了以下内容错误:
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
有人知道如何使其在64位版本中工作吗?预先感谢.
Any idea how to make it work in the 64-bit version? Thanks in advance.
推荐答案
Microsoft的凯西·康(Kathy Kong)很友好,可以为我提供解决此问题的方法.可以在MSDN TFS PowerTools论坛中找到完整的详细信息:
Cathy Kong of Microsoft was kind enough to provide me with a workaround for this issue. The full details can be found here in the MSDN TFS PowerTools forum: http://social.msdn.microsoft.com/Forums/en-US/tfspowertools/thread/a116799a-0476-4c42-aa3e-45d8ba23739e/?prof=required
解决方法如下,对我来说效果很好:
The fix is as follows and worked well for me:
请保存以下内容, 将其另存为* .reg文件并导入到 注册表(只需双击* .reg 文件,请单击确定",再双击)
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注册表编辑器5.00版
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ PowerShell \ 1 \ PowerShellSnapIns \ Microsoft.TeamFoundation.PowerShell] "PowerShellVersion" ="2.0" 供应商" =微软公司" "Description" =这是PowerShell 包括团队在内的管理单元 Foundation Server cmdlet." "VendorIndirect" ="Microsoft.TeamFoundation.PowerShell,Microsoft" "DescriptionIndirect" ="Microsoft.TeamFoundation.PowerShell,这 是一个PowerShell管理单元,其中包括 Team Foundation Server cmdlet." 版本" ="10.0.0.0" "ApplicationBase" ="C:\ Program文件 (x86)\ Microsoft Team Foundation Server 2010电动工具" "AssemblyName" ="Microsoft.TeamFoundation.PowerTools.PowerShell, 版本= 10.0.0.0,文化=中性, PublicKeyToken = b03f5f7f11d50a3a "ModuleName" ="C:\ Program文件 (x86)\ Microsoft Team Foundation Server 2010电源 Tools \ Microsoft.TeamFoundation.PowerTools.PowerShell.dll" "CustomPSSnapInType" ="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"
[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"
这篇关于TFS Power Tools 2008 Powershell Snapin将无法在Windows 2008 R2中的64位上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!