Retrieve the full certificate chain from a server

Retrieve the full certificate chain from a server (any port):
openssl s_client -host sipfed.online.lync.com -port 5061 -prexit -showcerts