Name | Type | Description | Required? | Pipeline Input | Default Value |
---|
Server | String[] | Specifies the IP or DNS addresses of the HCX servers you want to connect to. | true | False |
Credential | PSCredential | Specifies a PSCredential object that contains credentials for authenticating with the server. For more information about the server authentication logic of PowerCLI, run "help about_server_authentication". | false | False |
Force | SwitchParameter | Suppresses all user interface prompts during the cmdlet execution. Currently, these include 'Multiple default servers' and 'Invalid certificate action'. | 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 | Indicates 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 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 on the server you want to use for the connection. | false | False |
SaveCredentials | SwitchParameter | Indicates that you want to save the specified credentials in the local credential store. | false | False |
User | String | Specifies the user name you want to use for authenticating with the 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-HCXServer -Server $serverAddress -User $user -Password $pass
Connects to an HCX server by using the User and Password parameters.
-------------------------- Example 2 --------------------------
$credential = Get-Credential
Connect-HCXServer -Server $serverAddress -Credential $credential
Connects to an HCX server by using the Credential parameter.
-------------------------- Example 3 --------------------------
Connect-HCXServer -Server $serverAddress -Credential -User $user -Password $pass -SaveCredential
Connects to an HCX server and stores the credentials in the credential store.