Your script is already grouping the results per VM.
You can easily add a 2nd property to group by.
That would be Day in your case if I understand your question correctly?
Your scrip is looking at the averages and it finds the maximum average value.
Is that what you mean by 'peak' CPU and memory?
The 95th percentile is just a calculation you perform on the data for 1 day.
There are many examples available, see for example A percentile function for PowerShellBlog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
Thank you for your prompt response and assistance! Got what I needed by adding the 2nd property as you suggested.