Connect-NsxtServer

This cmdlet establishes a connection to an NSX-T server.

Syntax

-Server  <String[]>
[-Credential  <PSCredential>]
[-NotDefault]
[-Password  <SecureString>]
[-Port  <Int32>]
[-SaveCredentials]
[-UseRemoteAuthentication]
[-User  <String>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Server
String[] named Specifies the DNS name or the IP address of the NSX-T servers you want to connect to.
optional
Credential
PSCredential named Specifies the PSCredential object that contains credentials for authenticating with the NSX-T server. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication".
optional
NotDefault
SwitchParameter named Specifies that you do not want to save the specified servers as default servers.
optional
Password
SecureString named Specifies the password you want to use for authenticating with the NSX-T server. If the Credential parameter is also specified, this parameter is ignored. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication".
optional
Port
Int32 named Specifies the port you want to use when connecting to the NSX-T server API URL.
optional
SaveCredentials
SwitchParameter named Indicates that you want to save the specified credentials in the local credential store. When you save credentials for a specific server, you do not need to specify them each time you reconnect.
optional
UseRemoteAuthentication
SwitchParameter named Specifies that Workspace One Access (formerly VMware Identity Manager) identity provider should be used for authentication.
optional
User
String named Specifies the user name you want to use for authenticating with the NSX-T server. If the Credential parameter is also specified, this parameter is ignored. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication".

-Menu
[-UseRemoteAuthentication]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Menu
SwitchParameter named Indicates that you want to select a connection server from a list of recently connected servers. If Menu is set to $true, the cmdlet retrieves a list of the last visited servers and enters a nested command prompt, so that you can select a server from the list.
optional
UseRemoteAuthentication
SwitchParameter named Specifies that Workspace One Access (formerly VMware Identity Manager) identity provider should be used for authentication.

Output

Examples


Example 1

Connect-NsxtServer -Server $serverAddress -User $user -Password $pass

Connects to an NSX-T server by using the User and Password parameters.

Example 2

$credential = Get-Credential
Connect-NsxtServer -Server $serverAddress -Credential $credential

Connects to an NSX-T server by using the Credential parameter.

Example 3

Connect-NsxtServer -Server $serverAddress -Credential -User $user -Password $pass -SaveCredentials

Connects to an NSX-T server and stores the credentials in the credential store.

Example 4

Connect-NsxtServer -Server $serverAddress -User $user

Connects to an NSX-T server when a record for the specified server and user is available in the credential store.

Related Commands

Feedback

Was this page helpful?