VMware Cloud Community
isaac464a
Contributor
Contributor
Jump to solution

Can't connect to NSX-T Manager

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

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Which PowerCLI and PowerShell versions are you using?

Get-Module -Name VMware.* -ListAvailable
$PSVersionTable


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
10 Replies
LucD
Leadership
Leadership
Jump to solution

Did you set InvalidCertificateAction to 'Ignore' with Set-PowerCIConfiguration?
You can check with Get-PowerCLIConfiguration.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
isaac464a
Contributor
Contributor
Jump to solution

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)

isaac464a_0-1614156564670.png

I also tried to remove the web proxy configuration but still get the same error about connecting to NSX-T using Connect-NsxtServer

isaac464a_1-1614156864479.png

 

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Which PowerCLI and PowerShell versions are you using?

Get-Module -Name VMware.* -ListAvailable
$PSVersionTable


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
isaac464a
Contributor
Contributor
Jump to solution

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!

 

 

Reply
0 Kudos
isaac464a
Contributor
Contributor
Jump to solution

 

From Powershell 5.1  Get-Module -Name VMware.* -ListAvailable output

isaac464a_0-1614160176917.png

 

Reply
0 Kudos
isaac464a
Contributor
Contributor
Jump to solution

Thank you for assisting!

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
isaac464a
Contributor
Contributor
Jump to solution

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

 

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
Tonyke01
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos