I want to round off the cpu utilization percentage that is generated from the powershell script below. How do I do this?
$cpu=@{ name=”CPU”;`
expression = { `
($_ | get-stat –stat “cpu.usage.average” `
–maxsamples 12 | measure-object –average –property value).average } `
}
get-vmhost | select name,$cpu `
| sort –property CPU –descending | ConvertTo-HTML -Property Name,"CPU" `
-title "VMware Host CPU Utilization" | Format-Table Name,[math]::Round($cpu) -Auto | Out-File "C:\cpu.html"
Where in the code do I insert the int?