Connect to ESXi Host or vCenter Server

This Automation Manager object connects to an ESXi host or a vCenter server and returns the session ID to be used in other VMware-based objects.

Install VMware.PowerCLI

Before using this VMware Automation Manager Object, you must install the PowerShell module VMware.PowerCLI.

This VMware Automation Object runs on 64-bit PowerShell, and the module must also be added to 64-bit PowerShell.

Input Parameters

Name Type Required Description
Server DNS Name or IP Address String Yes This is the DNS name or the IP address of the ESXi host or vCenter server to which you want to connect.
User Name String Yes This is the username to connect to the host server. Note that it can also be under the format domain\user.
Password Password Yes This is the password for the user entered.

The password must be passed as a parameter via an input parameter for security.

Output Parameters

Name Type Description
OutSessionID String This is the session ID that will be used by other objects to perform actions against the ESXi host or vCenter server.
Result Number Returns a success value of zero or any value other than zero to indicate failure.
Result String String Object execution error details.

Example Input Parameters

Name Type Required Example
Server DNS Name or IP Address String Yes 10.199.2.23
User Name String Yes Root
Password Password Yes EsxPassword