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

Featured pages

Services

Windows Azure has several services available for use when you first sign up with Azure. Some of the…

PowerShell

Azure PowerShell scripts are integral part of Microsoft Azure environment. It is designed to help A…

Errors

Azure Cloud Services are very information when it comes to producing error messages. Some of the co…

Pricing

Windows Azure has difference services and pricing normally calculated via Online Azure Pricing Calc…