Connect to a vSphere Automation API Server
Use the Connect-CisServer cmdlet to establish a connection to a vSphere Automation API server.
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.
Note: If you do not want to use a proxy server for the connection, runSet-PowerCLIConfiguration -ProxyPolicy NoProxy
.
Procedure
- ♦
Connect to a vSphere
Automation API server.
Connect-CisServer -Server cis3.example.com -User 'MyAdministratorUser' -Password 'MyPassword'
What to do next
Run scripts by using the vSphere Automation API.