Let me try to put everything together:
I wrote the following script:
Add-PSSsnapin VMware.VimAutomation.Core
$myesxi = Connect-Viserver 192.168.1.1 -user root
$cpu = Get-Stat -entity $myesxi -Stat 'cpu.usage.average' - Realtime -maxsamples 1
but there is something wrong with the -entity parameter....
Can anybody please help?
Regards
marius