Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows Team基金会的动力工具即使詹金斯和X27也没有得到它的认可;它安装了什么 我已经安装了Team Foundation POWER工具到詹金斯服务器。我已经安装了TFS 2015和完整VS 2015。我想运行powershell脚本,该脚本从TFS中提取项目。我可以从Jenkins服务器运行它。当我尝试使用powershell插件从Jenkins build definition传递脚本时。我对Team基金会的动力工具有错误。詹金斯抱怨没有安装Team Foundation POWER工具。我试图卸载并重新安装该工具。我的Jenkins服务正在我安装此工具时使用的同一工具下运行。此外,此工具不是特定于用户的。它是为所有用户安装的。有人能帮忙吗_Windows_Powershell_Jenkins_Tfs_Tfs Power Tools - Fatal编程技术网

Windows Team基金会的动力工具即使詹金斯和X27也没有得到它的认可;它安装了什么 我已经安装了Team Foundation POWER工具到詹金斯服务器。我已经安装了TFS 2015和完整VS 2015。我想运行powershell脚本,该脚本从TFS中提取项目。我可以从Jenkins服务器运行它。当我尝试使用powershell插件从Jenkins build definition传递脚本时。我对Team基金会的动力工具有错误。詹金斯抱怨没有安装Team Foundation POWER工具。我试图卸载并重新安装该工具。我的Jenkins服务正在我安装此工具时使用的同一工具下运行。此外,此工具不是特定于用户的。它是为所有用户安装的。有人能帮忙吗

Windows Team基金会的动力工具即使詹金斯和X27也没有得到它的认可;它安装了什么 我已经安装了Team Foundation POWER工具到詹金斯服务器。我已经安装了TFS 2015和完整VS 2015。我想运行powershell脚本,该脚本从TFS中提取项目。我可以从Jenkins服务器运行它。当我尝试使用powershell插件从Jenkins build definition传递脚本时。我对Team基金会的动力工具有错误。詹金斯抱怨没有安装Team Foundation POWER工具。我试图卸载并重新安装该工具。我的Jenkins服务正在我安装此工具时使用的同一工具下运行。此外,此工具不是特定于用户的。它是为所有用户安装的。有人能帮忙吗,windows,powershell,jenkins,tfs,tfs-power-tools,Windows,Powershell,Jenkins,Tfs,Tfs Power Tools,添加PSSnapin:此计算机上未安装Windows PowerShell管理单元“Microsoft.TeamFoundation.PowerShell”。 在C:\Users\AppData\Local\Temp\jenkins432537511943060199.ps1:22字符:1 +在Microsoft.TeamFoundation.PowerShell中添加PSSnapin + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Cat

添加PSSnapin:此计算机上未安装Windows PowerShell管理单元“Microsoft.TeamFoundation.PowerShell”。 在C:\Users\AppData\Local\Temp\jenkins432537511943060199.ps1:22字符:1 +在Microsoft.TeamFoundation.PowerShell中添加PSSnapin + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +CategoryInfo:InvalidArgument:(Microsoft.TeamFoundation.PowerShell:String)[添加PSSnapin],PSArgument 例外情况 +FullyQualifiedErrorId:AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand Get-TfsChildItem:术语“Get-TfsChildItem”未被识别为 cmdlet、函数、脚本文件或可操作程序的名称。 检查名称的拼写,或者如果包含路径,请验证 路径正确,请重试。在 C:\Users\AppData\Local\Temp\jenkins432537511943060199.ps1:25 字符:10 +$items=Get-TfsChildItem$AutoDeployDir-Recurse-Server$tfsCollection + ~~~~~~~~~~~~~~~~ +CategoryInfo:ObjectNotFound:(Get-TfsChildItem:String)[],CommandNotFoundException +FullyQualifiedErrorId:CommandNotFoundException


如您所见,我可以在服务器内部手动运行它

根据误差

添加PSSnapin:Windows PowerShell管理单元 此计算机上未安装“Microsoft.TeamFoundation.PowerShell” 电脑

可能TFS Powertools未完全安装。默认情况下,它不安装PS cmdlet

因此,简单地在重新安装过程中添加,然后再次尝试使用Jenkins构建


更多方法请参考这个类似的问题:

我想出来了。这是x32和x64之间的工具的问题。您需要添加注册表来解决此问题。将下面的内容复制到*.reg文件中,然后双击该文件将其安装到注册表中

Windows注册表编辑器5.00版 [HKEY\U LOCAL\U MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell] PowerShellVersion“=“4.0”供应商“=“Microsoft Corporation” “Description”=“这是一个包含团队的PowerShell管理单元 基础服务器CMDeLe. “VendorIndirect”=“Microsoft.TeamFoundation.PowerShell,Microsoft” “DescriptionIndirect”=“Microsoft.TeamFoundation.PowerShell,这是一个 包括Team Foundation Server CMDLew的PuthSeam管理单元。 “版本”=“14.0.0.0”“应用程序库”=“C:\Program Files” (x86)\微软Team Foundation Server 2010动力工具 “AssemblyName”=“Microsoft.TeamFoundation.PowerTools.PowerShell, 版本=14.0.0.0,区域性=中性,PublicKeyToken=b03f5f7f11d50a3a“ “模块名”=“c:\程序文件(x86)\微软团队基金会 服务器2015电源 Tools\Microsoft.TeamFoundation.PowerTools.PowerShell.dll“ “CustomPSSnapInType”=“Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn”

[HKEY\U LOCAL\U MACHINE\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell] PowerShellVersion“=“4.0”供应商“=“Microsoft Corporation” “Description”=“这是一个包含团队的PowerShell管理单元 基础服务器CMDeLe. “VendorIndirect”=“Microsoft.TeamFoundation.PowerShell,Microsoft” “DescriptionIndirect”=“Microsoft.TeamFoundation.PowerShell,这是一个 包括Team Foundation Server CMDLew的PuthSeam管理单元。 “版本”=“14.0.0.0”“应用程序库”=“C:\Program Files” (x86)\微软Team Foundation Server 2010动力工具 “AssemblyName”=“Microsoft.TeamFoundation.PowerTools.PowerShell, 版本=14.0.0.0,区域性=中性,PublicKeyToken=b03f5f7f11d50a3a“ “模块名”=“c:\程序文件(x86)\微软团队基金会 服务器2015电源 Tools\Microsoft.TeamFoundation.PowerTools.PowerShell.dll“ “CustomPSSnapInType”=“Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn”

不要忘记根据您的设置更改PowerShellVersion和TFS版本。如果存在版本不匹配,它将不起作用。
我从

中找到了它。如果在Jenkins服务器上手动运行powershell脚本,它是否有效?是的,它工作得非常好。所以,我很困惑它是什么?我只是更新了问题中的错误。它在第一行中说“添加PSSnapin:此计算机上未安装Windows PowerShell管理单元‘Microsoft.TeamFoundation.PowerShell’”。我知道这一点,并且在安装时已完成此操作。正如我提到的,它在Jenkins服务器中手动工作,但不使用Jenkins构建定义/powershellplugin@Meet101很高兴在这里解决了这个问题。您的解决方案和链接与我上面提供的相同。很抱歉不清楚,我注意到这可能也是32位与64位powershell的问题。没有表达清楚,只是在简短的调查中说了更多的方式。