If you are using certificate to authenticate the agent to the server, you may see message "Failed to authenticate server; 'Server certificate isuntrusted'"
Please check the following to remedy the issue:
* Is the certificate trusted? In certmgr.msc under Personal certificate, find the certificate and check the trust.
* Is the private key also available?
* In Details/Edit properties check if Client Authentication is enabled in the purpose list.
If the certificate is not trusted, import the CA cert under Trusted Root CAs.
If all the above seems correct, you should check the in whole certificate chain all the CAs are trusted/not expired.