1st off I am looking for a complete script. What I want script to do is connect to the vcenter, get VM name, get what is the VMs current EVC mode, get cluster the VM is on and what what is the EVC mode for the cluster.
Regards,
The following PowerCLI script will connect to a vCenter Server named vCenter and will display the required information about EVC modes for each virtual machine on the vCenter Server:
Connect-VIServer -Server vCenter
Get-VM | Select-Object -Property Name,
@{Name='MinRequiredEVCModeKey';Expression={$_.ExtensionData.Runtime.MinRequiredEVCModeKey}},
@{Name='Cluster';Expression={$_.VMHost.Parent}},
@{Name='ClusterEVCMode';Expression={$_.VMHost.Parent.EVCMode}}
The following PowerCLI script will connect to a vCenter Server named vCenter and will display the required information about EVC modes for each virtual machine on the vCenter Server:
Connect-VIServer -Server vCenter
Get-VM | Select-Object -Property Name,
@{Name='MinRequiredEVCModeKey';Expression={$_.ExtensionData.Runtime.MinRequiredEVCModeKey}},
@{Name='Cluster';Expression={$_.VMHost.Parent}},
@{Name='ClusterEVCMode';Expression={$_.VMHost.Parent.EVCMode}}
RvdNieuwendijk,
First of all thank you for taking the time to respond. The third data point the ClusterEVCMode is coming out blank. I also tried the command Get-Cluster | select -Property Name,EVCMode and it reports the clusters names but not the EVCMode. Any thought as to what is going on?
Regards,
OK that is WEIRD I checked in the web client and EVC is enabled the two clusters I expected it to be on. Now there are several clusters in the two vcenters that do not have EVC enabled but that is again expected. p
Again confused by the lack of output.
The support for EVC mode was introduced in PowerCLI recently. Which version of PowerCLI are you using? You can try using the latest PowerCLI version, currently version 6.3 Release 1. PowerCLI 6.3 R1 is compatible with VMware vCenter Server 5.0 and higher versions.
I am using 5.5 R1, I will update and report back. Thank you again!
Issue resolved 6.3 R1 gets the script to work correctly.
Thank you again!