Get VM Information

This object returns information about virtual machines, including resources, status, etc.

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 This is the session ID that is generated by the VMware connection object.
This is required for this object to work.
Virtual Machine Name String Yes This is the name of the virtual machine about which you want to get information.
The field supports wildcards, so to return information about all virtual machines, use "*" as the value.

Output Parameters

Name Type Description
Virtual machines array Collection The array containing the following virtual machine information:

ItemTypeExample
CoresPerSocketInt1
DatastoreIdListStringDatastore-58d4c510-d58f4093-d307-14feb5da0c2d
FolderStringvm
FolderIdStringFolder-ha-folder-vm
GuestStringWindows2012R2:Microsoft Windows Server 2012 (64-bit)
GuestIdStringwindows8Server64Guest
HardwareVersionStringvmx-11
IdStringVirtualMachine-13
MemoryGBDouble4
NameStringWindows2012R2
NotesString 
NumCpuInt1
PersistentIdString500d0f98-2816-c168-4b4f-4e2dd30267f0
PowerStateStringPoweredOn
ProvisionedSpaceGBDouble54.41
UidString/VIServer=root@10.199.2.23:443/
VirtualMachine=VirtualMachine-13/
UsedSpaceGBDouble14.70
VersionStringv11
VMHostString10.199.2.23
VMHostIdStringHostSystem-ha-host
VMResourceConfigurationStringCpuShares:Normal/1000 MemShares:Normal/40960
VMs in array Number The number of virtual machines 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

Virtual Machine Name String Yes SRVExchange