代码之家  ›  专栏  ›  技术社区  ›  urig

TFS Power Tools 2008 PowerShell管理单元将不会在Windows 2008 R2中的64位上运行。

  •  2
  • urig  · 技术社区  · 15 年前

    我已经在我的Windows 2008 R2开发人员计算机上安装了TFS Power Tools 2008及其PowerShell集成功能。

    当我尝试运行以下命令以启用管理单元时:

    Add-PSSnapin Microsoft.TeamFoundation.PowerShell
    

    在PowerShell.exe的32位版本中,位于 C:\Windows\SysWow64\WindowsPowerShell\v1.0\PowerShell.exe 它很好用。但是当我尝试在64位版本中执行相同的操作时: C:\windows\system32\windows powershell\v1.0\powershell.exe 我得到以下错误:

    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位版本中工作吗?事先谢谢。

    3 回复  |  直到 12 年前
        1
  •  5
  •   Keith Hill    15 年前

    你倒过来了。管理单元是32位管理单元。它在PowerShell(x86)IE 32位下工作正常,但在PowerShell(x64)下不工作。注意:尽管文件夹名为sysww64,但它不是64位的。在64位窗口下,本机64位二进制文件进入$env:systemroot\system32。在windows-on-windows64层下运行的32位二进制文件(即它们从32位进程发出thunk,并指向64位操作系统调用)进入$env:systemroot\syswow64。

        2
  •  3
  •   Sergey Kostrukov    12 年前

    TFS Power Tools 2012的注册表文件:

    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"="11.0.0.0"
    "ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools"
    "AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    "ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll"
    "CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"
    
        3
  •  2
  •   urig    15 年前

    微软的Cathy Kong非常乐意为我提供解决这个问题的解决方案。完整的详细信息可以在这里的msdn-tfs-powertools论坛找到: http://social.msdn.microsoft.com/Forums/en-US/tfspowertools/thread/a116799a-0476-4c42-aa3e-45d8ba23739e/?prof=required

    解决方法如下,对我来说效果很好:

    请保存以下内容并 将其保存为*.reg文件并导入到 注册表(双击*.reg 文件,单击“确定”双击)

    Windows注册表编辑器版本5.00

    [hkey_local_machine\software\microsoft\powershell\1\powershell管理单元\microsoft.teamFoundation.powershell] “PowerShellVersion”=“2.0” “vendor”=“微软公司” “description”=“这是一个PowerShell 包括团队在内的管理单元 基础服务器CMDeLe. “vendorindirect”=“Microsoft.TeamFoundation.PowerShell,Microsoft” “DescriptionDirect”=“Microsoft.TeamFoundation.PowerShell,此 是包含以下内容的PowerShell管理单元 Team Foundation Server CMDeLe. “版本”=“10.0.0.0” “applicationBase”=“C:\程序文件 微软团队基金会(X86) 服务器2010电动工具” “assemblyname”=“Microsoft.TeamFoundation.Powertools.PowerShell, 版本=10.0.0.0,文化=中性, publickeytoken=b03f75f7f11d50a3a“ “modulename”=“C:\程序文件 微软团队基金会(X86) 服务器2010电源 工具\microsoft.teamfoundation.powertools.powershell.dll“ “customPSSnapinType”=“Microsoft.TeamFoundation.PowerTools.PowerShell.tfPSSnapin”

    推荐文章