My goal is to execute the PowerShell file on remote server through TFS tasks 'PowerShell on Target Machines
'
for that Steps I have taken so far are:
Both Build and remote server already enabled
Enable-PSRemoting -Force
also added the trusthost server IPs added
Set-Item wsman:\localhost\client\trustedhosts *
and
Restart-Service WinRM
after doing all above steps still got the following error on TFS task
##[error]Connecting to remote server 'REMOTE SERVER IP' failed with the following error message The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic.
What will be the reason or what I am missing any thing.