2 Replies Latest reply on Sep 18, 2020 1:02 PM by jroc151

    PowerCLI script help

    jroc151 Lurker

      I am new to PowerCLI and was hoping to get some assistance with a report I am trying to generate.  Ive found various scripts and was able to put something together using existing scripts I found on the Internet, which I've tweaked a bit (see attached) to get me close to what i am looking for for but not quite there yet.  I have a list of VMs that I want to use to produce a report, showing a line per VM per day for the past 7 days each showing VM's utilization (peak memory, peak CPU and the 95th percentile) in percentage as well as MHz  for CPU and MB for memory.


      Any assistance with this is greatly appreciated.  Thank you in advance!

        • 1. Re: PowerCLI script help
          LucD Guru
          User ModeratorsCommunity WarriorsvExpert

          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 PowerShell

          Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          • 2. Re: PowerCLI script help
            jroc151 Lurker

            Thank you for your prompt response and assistance!  Got what I needed by adding the 2nd property as you suggested.

             

            Thanks again!