Name | Type | Description | Required? | Pipeline Input | Default Value |
---|
Server | String[] | Specifies the DNS name or the IP address of the NSX-T servers you want to connect to. | true | False |
Credential | PSCredential | 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". | false | False |
Menu | SwitchParameter | 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. | true | False |
NotDefault | SwitchParameter | Specifies that you do not want to save the specified servers as default servers. | false | False |
Password | SecureString | 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".
Note: If the password contains special characters, enclose the entire string in single quotes ('). | false | False |
Port | Int32 | Specifies the port you want to use when connecting to the NSX-T server API URL. | false | False |
SaveCredentials | SwitchParameter | 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. | false | False |
User | String | 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".
Note: If the user name contains special characters, enclose the entire string in single quotes('). | false | False |
-------------------------- 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.