Powershell remote to Azure virtual machine SSL problems

Hi, I wanted to start powershell remote to azure virtual machine but this is what I get.

PS C:\Users\ipuhalo> enter-pssession -computername igymo2.cloudapp.net -credential igor -usessl
enter-pssession : Connecting to remote server igymo2.cloudapp.net failed with the following error message : The server
certificate on the destination computer (igymo2.cloudapp.net:5986) has the following errors:
The SSL certificate is signed by an unknown certificate authority. For more information, see the about_Remote_Troublesh
ooting Help topic.
At line:1 char:1 enter-pssession -computername igymo2.cloudapp.net -credential igor -usessl
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (igymo2.cloudapp.net:String) [Enter-PSSession], PSRemotingTransportExce
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed


Because it is self signed certificate you should import it on your pc so that you can trust this publisher. How to do it. In IE10 I couldn’t find the way to view and install certificate. You can do it with some other browsers like Firefox but not with IE. If you know the way please tell me. That’s why I did something else. I connected to Remote desktop  on virtual machine and open certificate snap in in mmc console.  Under personal find your certificate and export it to cert file without private key


Copy that file to your local pc, open mmc console with current user certificate snap in. Import certificate to Trusted root Certification Authority folder. After import you will confirm this security warning about untrusted publisher


After that you will be able to Powershell remotely to Azure virtual machine.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s