I'm a newbie with powercli and my boss is asking me to generate an hourly report on cpu average, memory average, disk i/o, and network i/o. Just picked up a book VMWare vSphere PowerCLI Reference but I'm overwhelmed with all the information. Wondering if there is a similar script from anyone out there that I can use or tailor according to my need.
Thanks
Steve
Actually we need a report for capacity planning like what is the current capacity and how is the CPU and memory utilization for the past one month? Memory here is consumed memory and also CPU its better if we can calculate vcpus remaining rather than ghz.
Have a look at Re: Automate CSV output to performance chart view powercli
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can this be done on specific list of VMs? Also, will this be straight thru PowerCLI? How can I make it to run automatically every 2-hours? Can this be run thru Windows scheduler?
Thank you in advance.
Yes, you can do this in many ways.
Through a mask in the Name field.
From a file
For your other questions, I suggest to do a search in this community or create a new thread.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
Can we get the report for a specific set of VM's or list of VM's ? E.g. C:\temp\servers.txt
Thanks
V
LucD,
When i try with specific vm's name it throws an error.
Get-VM : Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is not null o
At D:\nilay\VM_Perform_report.ps1:1 char:20
+ ... Get-VM -Name(Import-Csv -Path C:\temp\vmnames.csv -UseCulture).vmname ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-VM], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM
Get-Stat : 5/31/2020 8:11:22 AM Get-Stat Value cannot be found for the mandatory parameter Entity
At D:\nilay\VM_Perform_report.ps1:6 char:1
+ Get-Stat -Entity $vms -Start $start -ErrorAction SilentlyContinue |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-Stat], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats
Any help is appreciated.
Thanks
V
Do you actually have a column VMName in that CSV?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference