Syntax
Connect-CIServer [-Server] <String[]> [-Org <String>] [-Credential <PSCredential>] [-User <String>] [-Password <String>] [-Port <Int32>] [-NotDefault] [-SaveCredentials] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet establishes a connection to the specified cloud servers. The cmdlet starts a new session or re-establishes a previous session with a cloud server using the specified parameters. If a connection to a server already exists, the cmdlet returns an object which represents the existing connection.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Server | String[] | Specifies the IP or DNS addresses of the cloud servers you want to connect to. | true | false | |
PIDatacenter | CIServerRelatedObject | Specifies a vCloud Air datacenter, which can be retrieved by using the Get-PIDatacenter cmdlet or ?PIComputeInstance, which can be retrieved by using the Get-PIComputeInstance cmdlet.? | true | true (ByValue) | |
SessionId | String | Specifies the ID of an existing cloud server session you want to reestablish. | true | false | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | 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 | |
InformationAction | ActionPreference | false | false | ||
InformationVariable | String | false | false | ||
Menu | SwitchParameter | Indicates that you want to select a 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 | |
Org | String | Specifies the name of the organization you want to manage. By default, it is the System organization to which you must connect to. The value of the Org parameter overrides the domain part of the value provided to the User parameter. | false | false | |
Password | String | 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 | |
PipelineVariable | String | 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 | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Return Type
One or more CIServer objectsNotes
Examples
-------------- Example 1 --------------
Connect-CIServer -Server cloud.example.com -User Org1Admin -Password pass -Org Organization1
Connects as an organization user to the provided organization.
-------------- Example 2 --------------
Connect-CIServer -Server cloud.example.com -User admin -Password pass
Connects as a system administrator to a system organization.
-------------- Example 3 --------------
Connect-CIServer -Server cloud.example.com -Org Organization1 -Credential $vappUserCredential
Connects to the provided organization by specifying a credential object.
-------------- Example 4 --------------
Connect-CIServer -Server cloud.example.com -SessionID $sessionID
Connects to a server by providing a server session ID.
-------------- Example 5 --------------
Connect-CIServer -Menu
Connects to a server from the list of recently connected servers.
-------------- Example 6 --------------
$vCloudAirConnection = Connect-PIServer -User [email protected] -Password 'pass' $myDatacenter = Get-PIDatacenter 'myDatacenter' Connect-CIServer -PIDatacenter $myDatacenter
Connects to a vCloud Air datacenter.