TFS Power Tools 2008 Powershell Snapin 无法在 64 位 Windows 2008 R2 上运行 [英] TFS Power Tools 2008 Powershell Snapin won't run in on 64-bit in Windows 2008 R2

查看:18
本文介绍了TFS Power Tools 2008 Powershell Snapin 无法在 64 位 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:WindowsSysWOW64WindowsPowerShellv1.0powershell.exe 下它工作正常.但是,当我在这里尝试在 64 位版本中执行相同操作时:C:Windowssystem32WindowsPowerShellv1.0powershell.exe 我得到以下信息错误:

in the 32-bit version of PowerShell.exe, under C:WindowsSysWOW64WindowsPowerShellv1.0powershell.exe it works fine. But when I try to do the same in the 64-bit version here: C:Windowssystem32WindowsPowerShellv1.0powershell.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 的 Cathy Kong 非常友好地为我提供了解决此问题的方法.完整的详细信息可以在 MSDN TFS PowerTools 论坛中找到:http://social.msdn.microsoft.com/Forums/en-US/tfspowertools/thread/a116799a-0476-4c42-aa3e-45d8ba23739e/?prof=required

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_MACHINESOFTWAREMicrosoftPowerShell1PowerShellSnapInsMicrosoft.TeamFoundation.PowerShell]"PowerShellVersion"="2.0"供应商"=微软公司""Description"="这是一个 PowerShell包含团队的管理单元Foundation Server cmdlet.""VendorIndirect"="Microsoft.TeamFoundation.PowerShell,Microsoft""DescriptionIndirect"="Microsoft.TeamFoundation.PowerShell,This是一个 PowerShell 管理单元,其中包括Team Foundation Server cmdlet."版本"=10.0.0.0""ApplicationBase"="C:Program Files(x86)Microsoft 团队基础Server 2010 电动工具""AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell,版本=10.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a""ModuleName"="C:Program Files(x86)Microsoft 团队基础服务器 2010 电源工具Microsoft.TeamFoundation.PowerTools.PowerShell.dll""CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1PowerShellSnapInsMicrosoft.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 ToolsMicrosoft.TeamFoundation.PowerTools.PowerShell.dll" "CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"

这篇关于TFS Power Tools 2008 Powershell Snapin 无法在 64 位 Windows 2008 R2 上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆