TFS-Build: `Microsoft.TeamFoundation.PowerShell' ist auf diesem computer nicht installiert

Wenn ich angemeldet bin in tfs-build-server mit einem lokalen Konto und führen Sie die folgenden powershell-Befehl:

Add-PSSnapin Microsoft.TeamFoundation.PowerShell

lädt er die tfs cmdlets richtig. Allerdings, wenn ich die trigger ein zu bauen, die auf dem tfs-server, der startet das script, es schlägt fehl mit der Meldung:

'Von Microsoft.TeamFoundation.PowerShell' ist auf diesem computer nicht installiert.

Dem build-agent läuft unter service-Konto. Was soll ich tun?

BEARBEITEN:
Ich hatte zum Bearbeiten der reqistry Eintrag aus dem ersten link in @Alexis Coles' Antwort, damit es funktioniert mit der version 2015 von TFS PowerTools:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell]
"PowerShellVersion"="4.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"="14.0.0.0"
"ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2015 Power Tools"
"AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2015 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll"
"CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell]
"PowerShellVersion"="4.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"="14.0.0.0"
"ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2015 Power Tools"
"AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2015 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll"
"CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"

Überprüfen AssemblyName, ApplicationBase, ModuleName und Version Einträge. Skript oben funktioniert mit Microsoft Team Foundation Server 2015 Power Tools

InformationsquelleAutor Liero | 2016-02-09
Schreibe einen Kommentar