I've been playing around with the get-stat command. Thanks a bunch to Brian Denicola at http://www.bjd145.org/labels/vmware%20powershell.html for posting the example.
To grab memory stats from an ESX host type the command get-stat $esx -Memory -maxsamples 3 -realtime this will grab 3 memory samples from the server $esx.
$vc = get-viserver myvcserver -username admin -password vmwareThe -common switch gives averages for all major hardware subsystems cpu,memory, disk, and networking.
$esx = get-vmhost MyEsxServer
$get-stat $esx -Memory -maxsamples 3 -realtime
$get-stat $esx -common -maxsamples 1 -realtimeThere is also a way to pull individual counters provided that you know the counter name
get-stat $esx -stat cpu.usagemhz.averageThis returns the average cpu usage in MHZ over the interval of collection. The list of all counters can be found here:
http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/visdk25programmingguide.pdf