I am running below code and would like to add few column such as displaying the esxi host cluster name, EVC mode, Current EVC Mode and Supported EVC Modes.
code:
Get-Cluster | Get-VMHost | Select-Object -Property Name,Manufacturer,Model,ProcessorType,
@{Name="NumCpuCores";Expression={$_.ExtensionData.hardware.CpuInfo.NumCpuCores}},
CpuTotalMhz, MaxEVCMode
You could do something like this
Get-Cluster -PipelineVariable cluster | Get-VMHost |
Select-Object -Property Name,
@{N='Cluster';E={$cluster.Name}},
@{N='EVCMode';E={$cluster.EvcMode}},
@{N='SupportedEVCMode';E={
$script:evcMgr = Get-View -Id ($cluster.ExtensionData.EVCManager())
$script:evcMgr.EvcState.SupportedEVCMode.Key -join '|'}},
@{N='CurrentEvcMode';E={$script:evcMgr.EvcState.CurretnEVCModeKey}},
Manufacturer,Model,ProcessorType,
@{Name="NumCpuCores";Expression={$_.ExtensionData.hardware.CpuInfo.NumCpuCores}},
CpuTotalMhz, MaxEVCMode
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You could do something like this
Get-Cluster -PipelineVariable cluster | Get-VMHost |
Select-Object -Property Name,
@{N='Cluster';E={$cluster.Name}},
@{N='EVCMode';E={$cluster.EvcMode}},
@{N='SupportedEVCMode';E={
$script:evcMgr = Get-View -Id ($cluster.ExtensionData.EVCManager())
$script:evcMgr.EvcState.SupportedEVCMode.Key -join '|'}},
@{N='CurrentEvcMode';E={$script:evcMgr.EvcState.CurretnEVCModeKey}},
Manufacturer,Model,ProcessorType,
@{Name="NumCpuCores";Expression={$_.ExtensionData.hardware.CpuInfo.NumCpuCores}},
CpuTotalMhz, MaxEVCMode
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference