You could use the Get-Stat cmdlet to do that. Below is a script that will make an average of the last 5 records (in 20 seconds intervals) as grabbing only the last record might be misleading I believe.
Although the %USED and average Usage metrics will pretty much give the same thing so you may have to tinker with the averages.
$AverageSize = 5
$Table = foreach ($VM in (Get-VM | where powerstate -eq poweredon)) {
$USAGE = (get-stat -Entity $VM -Stat cpu.usage.average -Realtime| where {!$_.instance}|select -last $AverageSize | Measure-Object -Property value -Average).average
$RDY = (get-stat -Entity $VM -Stat cpu.ready.summation -Realtime| where {!$_.instance}|select -last $AverageSize | Measure-Object -Property value -Average).average/200
$CSTP = (get-stat -Entity $VM -Stat cpu.costop.summation -Realtime| where {!$_.instance}|select -last $AverageSize | Measure-Object -Property value -Average).average/200
$USED = (get-stat -Entity $VM -Stat cpu.used.summation -Realtime| where {!$_.instance}|select -last $AverageSize | Measure-Object -Property value -Average).average/200
[pscustomobject]@{
VM = $VM.name
Usage = "$([math]::round($USAGE,2))%"
"%RDY" = $RDY
"%CSTP" = $CSTP
"%USED" = $USED
}
}
$Table | Export-Csv -Path C:\mycsv.csv -NoTypeInformation
Would something like that work for you? Of course you can always adapt it to your needs.