Get Host(s) Information (VMware)

This object returns information about the currently connected host, or can return information about multiple hosts if connected to a vCenter Server. If no host name is entered, it will return data for all hosts found (when connected to vCenter) or it will return data about the host on which the session is connected.

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
Session ID String Yes The session ID that is generated by the VMware connection object.
This is required for this object to work.
Host Name String No The name or IP of the ESXi host to be returned. This is optional.

Output Parameters

Name Type Description
Hosts Information Collection A list of hosts returned by the object as an array to be used with a "Foreach" object. It contains the following host information:

ItemTypeExample
PowerStateStringPoweredOn
VMSwapfileDatastoreIdString1254121
VMSwapfilePolicyStringWithVM
IsStandaloneBooleanTrue
ManufacturerStringDell System
Model StringPowerEdge 320
NumCpu Number8
CpuTotalMhzNumber19144
CpuUsageMhzNumber332
LicenseKeyString11111-11111-11111-11111-11111
MemoryTotalGBNumber95.98077393
MemoryUsageGBNumber21.25195313
ProcessorTypeStringIntel(R)Xeon(R)CPUE5530@2.40GHz
HyperthreadingActiveStringTrue
TimeZoneStringUTC
VersionString6.0.0
BuildString3620759
ApiVersionString6
Name String192.168.0.100
Uid String/VIServer=root@
192.168.0.100:443/
VMHost=HostSystem-ha-host/
Hosts in array Number The number of hosts in the array.
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
Session ID String Yes ab4c55c1273cb609678a2bb6a15104e927ac8dec, 10.199.2.23
Host Name String Yes Esxhost1