VMware Cloud Community
m_pahlevanzadeh
Enthusiast
Enthusiast

The SSL connection could not be established, see inner exception

I have the following code :

$vcenterServer = "192.168.119.22"
$vcenterUsername = "user"
$vcenterPassword = "passwd"

$dataCeneterName = "dc"
$dsName = "datastore1"
$esxName = "192.168.119.1"

 

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false #discarding SSL connection
$vcenterInstance = Connect-VIServer -Server $vcenterServer -User $vcenterUsername -Password $vcenterPassword

 

But I get the following errror:

$vcenterInstance = Connect-VIServer -Server $vcenterServer -User $vcenterUsername -Password $vcenterPassword
Connect-VIServer: 4/11/2022 5:50:57 PM Connect-VIServer The SSL connection could not be established, see inner exception.

How can I solve it?

By the way, my pwsh is 7.2.1

Reply
0 Kudos
4 Replies
fabio1975
Commander
Commander

Ciao 

Can you check InvalidCertificateAction setting with the Get-PowerCLIConfiguration command?

Fabio

Visit vmvirtual.blog
If you're satisfied give me a kudos

Reply
0 Kudos
wila
Immortal
Immortal

moderator note:

@m_pahlevanzadeh in case you missed the "notification".

Please post your new PowerCLI questions in this group (click the link below and THEN post)
https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/bd-p/2805

I have moved many of your questions here as this is the place that people will see your PowerCLI questions and can help you. You post again and again in the wrong spot.

I'm not your "moderator move post service" and yes I understand the forum can be confusing. Next time you post in the wrong spot.. I will just leave it sitting there.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
LucD
Leadership
Leadership

Reply
0 Kudos
m_pahlevanzadeh
Enthusiast
Enthusiast

Solved, I downgrade my powercli to 7.0.

Reply
0 Kudos