After creating a release pipelin in Team Foundation Server, I got the following error during deployment:
Connecting to remote server failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.
As the error mentions first thing to check if I can use WinRM to invoke Powershell remotely. Therefore login on the target server and execute the following command:
- winrm quickconfig
- I said yes to apply the suggested changes
And indeed, no exception was configured on the firewall to allow access from remote computers. The winrm quickconfig did all the work for me to fix the situation. Nice!