Hi All,
I'm having trouble connect to a NSX-T 3.1 Manager, this is my first time using powercli and struggling at the first hurdle 😞 Apologies in advance for what i suspct is a simple issue!
Below is the error which has so far evaded my google skills...
I can connect to the NSX-T Manager using a web browser (https) with the same credentials.
PS C:\WINDOWS\system32> Connect-NsxtServer -Server 10.1.1.1 -User admin -Password mypw -Verbose
Connect-NsxtServer : 23/02/2021 13:15:09 Connect-NsxtServer Unable to connect to the remote server
At line:1 char:1
+ Connect-NsxtServer -Server 10.1.1.1 -User admin -Password mypw ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-NsxtServer], CisException
+ FullyQualifiedErrorId : ConnectSingleServer_UnhandledException,VMware.VimAutomation.Cis.Nsxt.Commands.Cmdlets.ConnectNsxtServer
Regards
Isaac
Which PowerCLI and PowerShell versions are you using?
Get-Module -Name VMware.* -ListAvailable
$PSVersionTable
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you set InvalidCertificateAction to 'Ignore' with Set-PowerCIConfiguration?
You can check with Get-PowerCLIConfiguration.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Thanks for your review
yes i have set to ignore certificates as the NSX-T is running on a self signed cert, below is the output from Get-PowerCLIConfiguration (It didn't paste well, so included a screenshot)
I also tried to remove the web proxy configuration but still get the same error about connecting to NSX-T using Connect-NsxtServer
Which PowerCLI and PowerShell versions are you using?
Get-Module -Name VMware.* -ListAvailable
$PSVersionTable
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I should have tried this at the start...
I was running powershell version 5.1.17134.858
Installed 7.1.2 and Connect-NsxtServer works!
From Powershell 5.1 Get-Module -Name VMware.* -ListAvailable output
Thank you for assisting!
That's the latest PowerCLI version.
Not sure what is happening there.
You could have a look in the NSX-T logs for more clues.
Perhaps you should open an SR.
Contrary to what GSS might claim, you do NOT need a Developer/SDK Support contract to open an SR for PowerCLI.
Point them to PowerCLI Support Breakdown
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Should PowerCli work fine with PowerShell 5.1 ?
Will investigate the support steps if so, as noticed that 7.1 has a shorter support cycle.
Regards
Yes, PowerCLI is supported on PSv5.1
The shorter lifecycle on the PSv7 version is due to the fact that this is updated regularly, with a .NET Core dependency.
See PowerShell Support Lifecycle
PSv5.1 will be the last Windows-only supported version.
And since it is part of the OS, like for example in Windows 10, it will live as long as those OSs.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The actual reason is the NSX-T uses a self-signed certificate, and the PowerCLI cannot accept the certificate automatically. You need to set the PowerCLI to ignore the invalid certificate with the following command:
Set-PowerCLIConfiguration -Scope User -InvalidCertificateAction:Ignore -Confirm:$false