PS> get-vm iss-esx-scc1
Name PowerState Num CPUs Memory (MB)
---- ---------- -------- -----------
iss-esx-scc1.itci... PoweredOn 2 8192
PS> get-vm iss-esx-scc1 | format-list
Name : iss-esx-scc1.xxxx.com
PowerState : PoweredOn
NumCpu : 2
MemoryMB : 8192
HardDisks : {Hard disk 1, Hard disk 2}
CDDrives : {CD/DVD drive 1}
FloppyDrives : {Floppy drive 1}
NetworkAdapters : {Network adapter 1, Network adapter 2}
UsbDevices : {}
Host : iss-esx-vm01.xxxx.com
Id : VirtualMachine-vm-178
Notes :
PS>
get-vm iss-esx-scc1 | format-list *
PowerState : PoweredOn
Version : v7
Description :
Notes :
Guest : iss-esx-scc1.xxxx.com:
NumCpu : 2
MemoryMB : 8192
HardDisks : {Hard disk 1, Hard disk 2}
NetworkAdapters : {Network adapter 1, Network adapter 2}
UsbDevices : {}
CDDrives : {CD/DVD drive 1}
FloppyDrives : {Floppy drive 1}
Host : iss-esx-vm01.xxxx.com
HostId : HostSystem-host-115
VMHostId : HostSystem-host-115
VMHost : iss-esx-vm01.xxxx.com
VApp :
FolderId : Folder-group-v22
Folder : vm
ResourcePoolId : ResourcePool-resgroup-114
ResourcePool : Resources
PersistentId : 5256a506-9e03-ac9c-c997-b2b8936b1b0b
UsedSpaceGB : 16.80688
ProvisionedSpaceGB : 127.0002
DatastoreIdList : {Datastore-datastore-148, Datastore-datastore-149}
HARestartPriority :
HAIsolationResponse :
DrsAutomationLevel :
VMSwapfilePolicy : Inherit
VMResourceConfiguration : CpuShares:Normal/2000 MemShares:Normal/81920
CustomFields : {}
ExtensionData : VMware.Vim.VirtualMachine
Id : VirtualMachine-vm-178
Name : iss-esx-scc1.xxxx.com
Uid : /VIServer=ardevaraju@iss-esx-vc02.xxxx.com:443/VirtualMachine=VirtualMachine-vm-178/
PS> get-vmhost | get-vm | where-object { $_ -like "*nim*" }
Name PowerState Num CPUs Memory (MB)
---- ---------- -------- -----------
iss-esx-nimmonfp0... PoweredOn 2 4032
iss-esx-nim01.itc... PoweredOn 4 8192
iss-esx-nimsql1.i... PoweredOn 4 8192
iss-esx-nimthub01... PoweredOn 2 4096
iss-esx-nimfhub01... PoweredOn 2 4096
PS> get-vmhost | get-vm | where-object { $_.name -eq 'iss-esx-nim01' } | Get-NetworkAdapter
Name Type NetworkName MacAddress WakeOnLan
Enabled
---- ---- ----------- ---------- ---------
Network adapter 1 e1000 ISS Network 00:50:56:b7:65:e3 True
Network adapter 2 e1000 VM Storag... 00:50:56:b7:3c:38 True
PS> get-vmhost | get-vm | where-object { $_.name -eq 'iss-esx-nim01' } | Get-Datastore
Name FreeSpaceMB CapacityMB
---- ----------- ----------
iss-esx-nim01:OSDISKn 21704 81664
iss-esx-nim01:D_DISK 19526 50944
PS > get-vmhost iss-esx-vm01 | get-vm | get-vmguest
State IPAddress OSFullName
----- --------- ----------
Running {10.0.0.40, 10.15... Microsoft Windows Server 2008 R2 (64-bit)
Running {172.17.1.200} Microsoft Windows Server 2003 (32-bit)
NotRunning {}
Running {10.0.0.186, 10.1... Microsoft Windows Server 2008 R2 (64-bit)
NotRunning {}
NotRunning {}
NotRunning {}
NotRunning {}
NotRunning {}
Running {10.150.1.28, fe8... Red Hat Enterprise Linux 4 (32-bit)
Running {10.150.4.157, fe... Red Hat Enterprise Linux 4 (32-bit)
Running {10.150.1.35, fe8... Red Hat Enterprise Linux 5 (64-bit)
Running {10.150.1.14} Microsoft Windows Server 2008 (32-bit)
NotRunning {}
Running {10.0.0.180, 10.1... Microsoft Windows Server 2008 R2 (64-bit)
Running {10.0.0.183, 10.1... Microsoft Windows Server 2008 R2 (64-bit)
Running {10.150.1.16, 10.... Microsoft Windows Server 2008 R2 (64-bit)
Running {169.254.9.208, 1... Microsoft Windows Server 2003 (32-bit)
PS> get-vmhost iss-esx-vm01 | get-vm | where {$_.Memorymb -lt 2048}
Name PowerState Num CPUs Memory (MB)
---- ---------- -------- -----------
rfin-esx-mail1.it... PoweredOn 1 512
iss-esx-w2k3_32.h... PoweredOff 1 1024
iss-esx-w2k8_64.h... PoweredOff 2 1024
iss-esx-rhel5664-... PoweredOff 2 1024
hjbb-esx-ftp1.itc... PoweredOn 1 500
iss-esx-mman01.it... PoweredOn 2 512
iss-esx-sfm01.itc... PoweredOn 2 1024
PS> get-vmhost iss-esx-vm01 | get-vm | where {$_.Memorymb -gt 2048}
Name PowerState Num CPUs Memory (MB)
---- ---------- -------- -----------
iss-esx-nimmonfp0... PoweredOn 2 4032
itc-esx-dnx01.itc... PoweredOn 2 4096
iss-esx-scc1.itci... PoweredOn 2 8192
iss-esx-mail1.itc... PoweredOn 2 4096
iss-esx-ad01.itci... PoweredOn 2 4096
iss-esx-mgr02.itc... PoweredOn 4 8192
iss-esx-nim01.itc... PoweredOn 4 8192
iss-esx-sdp01.itc... PoweredOn 4 4096
iss-esx-nimsql1.i... PoweredOn 4 8192
PS>
PowerCLI Banner:
http://dl.dropbox.com/u/50666315/blog/Final-PowerCLI-4.1.1.pdf