Hello @YehudaLevi1999 ,
From the errors you shared, the initial connection handshake is failing, thus any other powershell calls will fail. Below are a few observations:
Your command includes a blank space between the dash - and HTTPS argument, resulting in the connection to first attempt HTTP method and failing:
"connect-nccontroller svm1 -credential $credential -verbose -debug - https"
Here we see the HTTPS being ignored:
verbose: trying http/ https
Here we see the blank space between the dash and HTTPS again with the additional argument to call upon variable $credential to authenticate:
"connect-nccontroller -name svm2 - https -credential $credential -V.."
Then we see the error header failing to connect via HTTP not HTTPS:
"category info: invalidresult :(svm1:nccontroller) [connect-nccontroller], naconnectionSSLexception
fullyqualifederrorid: httpconnection failed,dataontap.c.powershell.sdk.connnectnccontroller"
Please check the command for any syntax errors, along with the configuration for $credential; to eliminate HTTPS or SSL certificate as the issue, simplify the $credential variable configuration and test using HTTP.
Sharing a connection test I used in a lab:
PS LAB> $creds_nc1 = Get-Credential -message 'Please provide password for nc1'
PS LAB> $creds_nc2 = Get-Credential -message 'Please provide password for nc2'
PS LAB> $nc1 = Connect-NcController lab-cluster1 -Credential $creds_nc1
PS LAB> $nc2 = Connect-NcController lab-cluster2 -Credential $creds_nc2