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
Ciao
Can you check InvalidCertificateAction setting with the Get-PowerCLIConfiguration command?
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
Duplicate of Re: Connect-VIServer - SSL inner exception after s... - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Solved, I downgrade my powercli to 7.0.