Automation

 View Only
  • 1.  Please help me with a PowerShell script

    Posted Nov 27, 2019 02:55 PM

    Can someone please create a PowerShell script which can show below fields and export report in Csv/Excel?

    vCenterName, HostClusterName, ESXiHostName, ClusterCPU_Usage, ClusterMemUsage, DataStoreUtilizationPercent

    Thank you in advance.



  • 2.  RE: Please help me with a PowerShell script

    Posted Nov 27, 2019 02:56 PM

    Did you attempt to help yourself first at all before coming and asking others to do your work for you?



  • 3.  RE: Please help me with a PowerShell script

    Posted Nov 27, 2019 03:06 PM

    Yes daphnissov, I did.

    However, I'm not able to generate the output as I need.



  • 4.  RE: Please help me with a PowerShell script

    Posted Nov 27, 2019 03:08 PM

    Ok, so paste in what you have done so far so we can help.



  • 5.  RE: Please help me with a PowerShell script

    Posted Nov 27, 2019 02:58 PM

    What do you already have in your script?
    Have you done a search in this community?
    I'm pretty sure there are several scripts available here that provide most of what you want.



  • 6.  RE: Please help me with a PowerShell script

    Posted Nov 27, 2019 03:09 PM

    Thanks LucD​ for your reply. Infact, I referred to lot of your scripts but I'm unable to combine them. It's been hours I'm trying but couldn't figure it out.



  • 7.  RE: Please help me with a PowerShell script

    Posted Nov 27, 2019 03:32 PM

    From what did you start?
    Even if it doesn't work, it would people to understand what you want and help you in achieving that.

    For example, what should go into the DataStoreUtilizationPercent field?
    Is that the percentage for all datastores in the cluster?
    Or is that per datastore in the cluster?

    If that is per datastore, how you want to represent that in the output?

    There will be redundant information for all fields that are calculated on the cluster level.

    What should the ClusterCPU_Usage and ClusterMemUsage field contain?

    The current values?

    An average over a period of time?

    How long would that period of time be?

    The best, and imho only, way to start with a script, is to have a clear definition of what you want to come out of the script.