Some useful values from PowerCLI Get-View of VMware Virtual Infrastructure for use in scripts. I have also included some example data and notes. I have found that when writing scripts you end up using many of the same keys regularly. So this is a small list to save having to find this information each time.
Virtual Machine
$vm = Get-View -ViewType VirtualMachine -Filter @{"Name"=""}
$vm.
Name VCAC6
$vm.config.
GuestFullName SUSE Linux Enterprise 11 (64-bit)
Version vmx-07
Template false
GuestId sles11_64Guest
Annotation vCloud Automation Center enables.....
$vm.config.Tools.
ToolVersion 2147483647
$vm.config.Hardware.
NumCPU 2
NumCoresPerSocket 1
MemoryMB 8192
vm.config.hardware.device
Type = VMware.Vim.VirtualDisk
CapacityInKB
$vm.config.Files.
VMPathName [loaclvmfs02-ocz] vCAC6/vCAC6.vmx
$vm.Runtime.
PowerState poweredOff
MemoryOverhead 254865408
$vm.Summary.Storage.
Committed 5420092483 (UsedSpace)
Uncommitted 35647188992 (Thin space not yet used)
Committed = UsedSpace
Committed + Uncommitted = Provisioned Space
$vm.Summary.Config.
NumEthernetCards 1
NumVirtualDisks 2
$vm.Summary.Guest.
IpAddress 192.168.1.25
$vm.config.BootOptions.
BootDelay 3000 (milliseconds to wait before booting VM, maximum allowed is 10,000)
EnterBIOSSetup $true
VMHost
$vmhost = Get-View -Viewtype HostSystem -Filter @{"Name"="" }
$vmhost.
Name pesx01.localdomain
$vmhost.Summary.Hardware.
Vendor Gigabyte Technology Co., Ltd.
Model X58A-UD3R
MemorySize 25768087552
CpuModel Intel(R) Core(TM) i7 CPU 950 @ 3.07Ghz
CpuMhz 3064
NumCpuPks 1
NumCpuCores 4
NumCputhreads 8
$vmhost.config.Product.
Version 5.5.0
Build 1892794
$vmhost.hardware.
Asset number
Service tag
Param(
[VMware.Vim.ManagedEntity]
$vmhost
)
Datastores
$ds = Get-View -ViewType Datastore -Filter @{"Name"=""}
$ds.
Name localvmfs01-samsung
$ds.Info.
FreeSpace 942653046784
url /vmfs/volumes/4d5997e7-c73dee74-d1aa-001b219c053f
$ds.Info.Vmfs.
MajorVersion 3
Version 3.46
ssd false
Type VMFS
Capacity 995627106304
$ds.vm.
[0]...[n] VirtualMachine-10 (Where n is the number of virtual machines)
Length 7 (the number of Virtual Machines either on this datastore or have a connection to something on the datastore. For example they have a mapping to an ISO file. It does not matter whether the mapping is connected or not it shows up if the path is in the Virtual Machine Settings. So in this example there are 3 VMs and 4 VMs with ISO files.)