The SSL certificate contains a common name (CN) that does not match the hostname.
You may run into "The SSL certificate contains a common name (CN) that does not match the hostname" error message if you are trying to establish secure connection to your Azure Account via Azure PowerShell cmdlet -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck). This error indicates that your SSL certificate does not have valid Common Name in it and you may need to add it.
-SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck)
Enter-PSSession : Connecting to remote server siteSubdomain.cloudapp.net failed with the following error message : The server certificate on the destination computer (siteSubdomain.cloudapp.net:5986) has the following errors:
The SSL certificate contains a common name (CN) that does not match the hostname. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -ComputerName siteSubdomain.cloudapp.net -Port 5986 -Credential $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (siteSubdomain.cloudapp.net:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed