VMware Cloud Community
SK90
Enthusiast
Enthusiast

Automate CSV output to performance chart view powercli

Team,

I was wondering if i can automate below powercli script CSV output to a graphical chart(X,Y coordinates)  to understand capacity management of devices. This script will produce output in hourly basis & same need to convert into graphical chart. Urgent response is highly appreciable. thanks in advance.

connect-viserver vCenter_Name

$vm= Get-Content D:\Script\Server.txt

Get-VM $vm | Select Name, `

@{N="Mem Usage( % )" ; E={ $_ | get-stat -Stat mem.usage.average -MaxSamples 1 -Start (Get-Date).AddDays(-1) -IntervalMins 60}} , `

@{N="CPU Usage( % )" ;E={ $_ | get-stat -Stat cpu.usage.average -MaxSamples 1 -Start (Get-Date).AddDays(-1) -IntervalMins 60}} |

Export-Csv -Path d:Report.csv -NoTypeInformation

20 Replies
NAS91
Contributor
Contributor

@SK90

Could you shine some light on how you got that graph? The script you provided did exactly what I needed, but the customer would perfer a graphical chart.

0 Kudos