Hey LucD,
I ran the script in the powershell editor and also in power cli on two different vcenters. I did not get any errors and also no output. I guess i have to chage the limit. so I changed the limit to 40.The limit you are reffering is to print the machine names which reached the average use of CPU and Memory to 40%. am i right??
Also the output prints the same vm multiple times with the time stamp??
here is the output
VM Time
-- ----
28 2/4/2013 12:00:00 PM
48 2/4/2013 10:30:00 AM
48 2/4/2013 10:00:00 AM
48 2/4/2013 9:30:00 AM
48 2/4/2013 9:00:00 AM
48 2/4/2013 8:00:00 AM
48 2/4/2013 7:30:00 AM
45 2/4/2013 9:30:00 AM
45 2/4/2013 9:00:00 AM
45 2/4/2013 8:00:00 AM
45 2/4/2013 7:30:00 AM
45 2/4/2013 3:00:00 AM
56 2/4/2013 12:30:00 PM
56 2/4/2013 12:00:00 PM
56 2/4/2013 11:30:00 AM
lab-vm 2/4/2013 1:30:00 AM
lab-vm 2/4/2013 1:00:00 AM
After the braces i added this export command and it started asking for Input object. I think powershell recognized export command as a new command line rather than part of that code?? How can i add the export command as the part of the code??
Thanks
VK