You can connect to an on-prem NSX server by using the Connect-NsxServer cmdlet.

Prerequisites

  • If the certificate of the server you want to connect to is not trusted, verify that your PowerCLI invalid server certificate action settings are configured properly. For more information, see Configuring PowerCLI Response to Untrusted Certificates.

  • If you use a proxy server for the connection, verify that it is configured properly, so that the connection is kept alive long enough for tasks to finish.

Procedure

  • Run Connect-NsxServer with the NSX server IP address or FQDN and valid user credentials.
    Connect-NsxServer -Server <nsx_server_ip_address_or_fqdn> -User <my_username> -Password <my_password>