I have installed Team foundation power tool to Jenkins server. I have TFS 2015 installed with Full VS 2015. I want to run powershell script which pull project from TFS. I am able to run it from Jenkins server. When i try to pass that script from Jenkins build definition using powershell plugin. I am getting errors regarding Team foundation power tool. Jenkins is complaining that team foundation power tool is not installed. I tried to uninstall and reinstall tool. My Jenkins service is running under same by using which i installed this tool. Also, this tool is not user specific. It's installed for all users. can someone please help?
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.TeamFoundation.PowerShell' is not installed on this computer. At C:\Users\AppData\Local\Temp\jenkins4325377511943060199.ps1:22 char:1 + Add-PSSnapin Microsoft.TeamFoundation.PowerShell + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.TeamFoundation.PowerShell:String) [Add-PSSnapin], PSArgument Exception + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand Get-TfsChildItem : The term 'Get-TfsChildItem' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\AppData\Local\Temp\jenkins4325377511943060199.ps1:25 char:10 + $items = Get-TfsChildItem $AutoDeployDir -Recurse -Server $tfsCollection + ~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-TfsChildItem:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException