Azure exposes a remoting endpoint by default to Windows Servers, and at some point you will need to turn to scripting to manage a servers
environments to perform automated tasks ,and some daily repeated tasks .
so you think if we got all the info above from Azure ,we are set right ?
sure .. go ahead try it 🙂
Connect VM on Azure with PS
so..its not going so well, from the error we got we can learn we must use SSL authentication in order to create a session.
so we can use with
PS C:\> Enter-PSSession AzureVM.cloudapp.net -Port 5986 -Credential %UserName% -UseSSL
but we first must install the certificate for this VM ,in order to get the VM Certificate we can log in to the VM it-self and export it from the
MMC (Start->Run->certlm.msc->Personal->Certificates) and then install it on our local machine.
– or –
we can browse to the machine certificate and save it to a file instead ,like –
go to the Certificate Details and Save it to File –
Now Import the saved certificate to the User Certificates, this should be imported to
(Start->Run->Certmgr.msc->Trusted Root Certification Authorities->Certificates)
Now with the certificate installed locally, you can try to create a new PowerShell Remoting session:
Now you should be able to Remote powershell with your Azure VM.