question

PaddyBrangan-6886 avatar image
1 Vote"
PaddyBrangan-6886 asked PaddyBrangan-6886 commented

Invoke-AzVMCommand in Cloud Shell error error:1416F086:SSL

Hi,

I'm working in Cloud Shell and I'm trying to use the Invoke-AzVMCommand to view services running on a test VM.

I've done the following:

Enable-AzVMPSRemoting -Name web02 -ResourceGroupName PB-RG-Training01 -Protocol https -OsType Windows

$u = 'test'
$p = ConvertTo-SecureString '' -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($u, $p)

I then run this command:

Invoke-AzVMCommand -Name web02 -ResourceGroupName PB-RG-Training01 -ScriptBlock {get-service win*} -Credential $cred

And this is the response I get:

OpenError: /usr/local/share/powershell/Modules/PSCloudShellUtility/PSCloudShellUtility.psm1:1112
Line |
1112 | Invoke-Command @invokeCommandParams -ErrorAction Stop
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| [13.79.4.200] Connecting to remote server 13.79.4.200 failed
| with the following error message : error:1416F086:SSL
| routines:tls_process_server_certificate:certificate verify
| failed For more information, see the
| about_Remote_Troubleshooting Help topic.

I've checked the NSG and I can see the winrm rule in there. I can RDP to the server etc. I turned off the Windows firewall but this made no difference.


Any help would be really appreciated.

Thanks,

Paddy

windows-server-management
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

hi

It seems related with the certificate, did you upload the suitable certificate for your deployment?

Best
Karlie

0 Votes 0 ·

Hi Karlie

Thanks for getting back to me. I'm trying to access a newly create VM from the Azure cloud shell (PowerShell). I'm just trying to run some PS commands against this new VM. I've allowed winrm over HTTPS on the VM. Do I need to store the self signed cert somewhere and reference this when trying to invoke a command on the VM?

All the articles I've read don't mention anything about this i.e. it should just work once you've run this command:

Enable-AzVMPSRemoting -Name weba -ResourceGroupName Test-RG -Protocol https -OsType Windows

Not sure why i'm getting an SSL error?

Thanks,

Paddy

1 Vote 1 ·

Hi Paddy,

Were you ever able to figure out the problem with this? I am dealing with the same issue and I cannot find any documentation in regards to the certificate. Thanks!

Greg

0 Votes 0 ·
Show more comments

0 Answers