Hi,
The warning of server authentication fails is could be chose under advanced option of RDC. But per below article, it could also be modified by commands or scripts:
Navigate to Configure RDSH Server Certificates
https://ryanmangansitblog.com/2013/03/10/configuring-rds-2012-certificates-and-sso/
https://ryanmangansitblog.com/2014/05/20/rds-2012-rdsh-certificate-deployment-script/
Note: The author also confirmed the risk of this change: if you don’t mind the certificate warnings, don’t change the Session host RDP certificates. If you make the change from the default, when DNS names don’t match authentication will fail, meaning that you will not be able to access the session hosts.
----------
Hope this helps and please help to accept as Answer if the response is useful.
Thanks,
Jenny