I want get real time Network-adapter's usage for an VM.
I'm a beginner for PowerCli.
You can use the Get-Stat cmdlet with the Realtime switch.
Something like this
$counter = "net.usage.average" $vm = Get-VM MyVM Get-Stat -Entity $vm -Stat $counter -Realtime -MaxSamples 1
It will show you the usage for the vNIC and the vmnics on the ESXi host.
Depending on what you want to see, you can filter on the Instance property.
You can also retrieve the instances from multiple intervals.
Let me know what exactly you want to report on.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The command your give is useful.