Hi,
I am looking for a script to run that will give me the total Vcpu's used by all guests accross my cluster.
Any ideas?
Thanks
Deon
It looks as if you forgot the verticar bar (pipeline symbol) at the end of the first line.
Get-Cluster production |
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try something like this
Get-Cluster |
Select Name,
@{N="Total vCPU";E={Get-VM -Location $_ | Measure-Object -Property NumCpu -Sum | Select -ExpandProperty Sum}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
I tried; (But not getting the Vcpu's total for all guests, what am I doing wrong?)
Connect-VIServer Test
Get-Cluster production
Select Name,
@{N="Total vCPU";E={Get-VM -Location $_ | Measure-Object -Property NumCpu -Sum | Select -ExpandProperty Sum}}
I get:
HATotalSlots :
HAUsedSlots :
HAAvailableSlots :
HASlotCpuMHz :
HASlotMemoryMb :
HASlotMemoryGB :
HASlotNumVCpus :
ParentId : Folder-group-h4
ParentFolder : host
HAEnabled : True
HAAdmissionControlEnabled : True
HAFailoverLevel : 0
HARestartPriority : Medium
HAIsolationResponse : DoNothing
VMSwapfilePolicy : WithVM
DrsEnabled : True
DrsMode : FullyAutomated
DrsAutomationLevel : FullyAutomated
Name : Production
CustomFields : {}
ExtensionData : VMware.Vim.ClusterComputeResource
Id : ClusterComputeResource-domain-c7
Uid : /VIServer=xxxxx\xxxxx@xxxxx:443/Cluster=ClusterCompu
teResource-domain-c7/
It looks as if you forgot the verticar bar (pipeline symbol) at the end of the first line.
Get-Cluster production |
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You the man!! thanks