Im trying to pull a list of cluster resources but im having a couple of issues with the sections highlighted red
Get-Datacenter $global:DCChoice | Get-Cluster $global:CLUChoice |
Select Name, HAEnabled, DRSEnabled,
@{N=“TotalCores“;E={Get-VMHost -Location $_ | Measure-Object NumCpu -Sum | Select -ExpandProperty Sum}},
@{N=“ProvisionedCores“;E={Get-VMHost -Location $_ | get-vm | Measure-Object NumCpu -Sum | Select -ExpandProperty Sum}},
@{N=“CoresRatio“;E={[INT]($_.ProvisionedCores/$_.TotalCores)}},
@{N=“TotalMem“;E={[math]::Round(Get-VMHost -Location $_ | Measure-Object MemoryTotalGB -Sum | Select -ExpandProperty Sum)}},
@{N=“ProvisionedMem“;E={Get-VMHost -Location $_ | get-vm | Measure-Object MemoryGB -Sum | Select -ExpandProperty Sum}} | FT
"CoresRatio" just returns no value
"TotalMem" works if i take the math out trying to round the number but it displays too many decimal places
Any idea what i am doing wrong? Thanks!