Hi team,
I would like to know the total number of CPUs which is under evaluation mode. The script i created is as below.
$ServiceInstance = Get-View ServiceInstance
$Eval = (Get-View ($ServiceInstance | Select -First 1).Content.LicenseManager | select -ExpandProperty licenses | ? {$_.Name -match "Evaluation mode"}| select Used| Measure-Object -Property Used -sum).Sum
Write-host "$Eval"
Using this format, i got the license count of licensed CPUs, but unable to get for evaluation mode, Am not sure what is missing.
Can some one help me please.
Output required:
If there are 4 hosts with 2 CPU each running in evaluation mode , i need output as "8"