I can't work on how a script works

I found a script to http://www.vmwareadmins.com/list-the-hostname-cluster-name-memory-size-cpu-sckets-and-cpu-cores-of-each-esx-host-using-p... who gets information about all hosts in each cluster in a virtualcenter I can run without a problem, but I can't work on its functioning.

$myCol = @)

ForEach ($Cluster Get-cluster)

{

ForEach ($vmhost in ($cluster |)) Get - VMHost))

{

$VMView = $VMhost | Get-View

$VMSummary = "" | Select the host name, ClusterName, MemorySizeGB, CPUSockets, CPUCores

$VMSummary.HostName = $VMhost.Name

$VMSummary.ClusterName = $Cluster.Name

$VMSummary.MemorySizeGB = $VMview.hardware.memorysize / 1024 mb

$VMSummary.CPUSockets = $VMview.hardware.cpuinfo.numCpuPackages

$VMSummary.CPUCores = $VMview.hardware.cpuinfo.numCpuCores

$myCol += $VMSummary

}

}

$myCol # | out-gridview

I do not understand the first line - $myCol = @)

I can understand how it gets a list of clusters and then she walks the clusters for the host in each. What I don't understand, that's how he gets the individual variables. For example, take the line "'$VMSummary.CPUSockets = $VMview.hardware.cpuinfo.numCpuPackages" "

Looking at the entrance VMHost in to 6.0 Documentation Center vSphere powercli documentation , there is none. hardware.cpuinfo.numCpuPackages property, only the CpuTotalMhz and the CpuUsageMhz. Is this information something to do with an esxcli order?

With Get-View, you have access to the real object of vSphere.

These objects are described in the vSphere QAnywhere.

For example, the hardware.cpuinfo.numCpuPackages property is described in HostHardwareInfo object.

Tags: VMware

Similar Questions

Maybe you are looking for

  • On the iPad can't watch embedded on msn but ok with yahoo

    Why watch icant embedded msn video but good in yahoo? This past with iPad mini 3 and my new iPad 9.7 Pro. check my MacBook Pro and I can watch msn video.where is the problem? Thanks for looking into this. you all have a nice day.

  • Download the album which has divided into two parts to consolidate

    I bought an album containing 14 tracks from the iTunes Store.  After downloading, my music screen showed 2 copies of the work from the album. 13 titles have been listed under a copy of the work and the remaining runway is under the other copy of the

  • Forum Question: How do all my subscriptions?

    If I am logged in to the Forum and click on "Control Panel" at the top and go to the "My subscriptions" section, on the bottom, it says that I have more than 2 pages.  How can I actually see these messages on other pages?  I'm checking on one of my o

  • Pavilion Dv6-6189sx: I can leave my laptop runs continuously for 30 days.

    Hello I need to download a huge file and the internet connection is slow, so it will take about 30 days if it is downloaded permanently within 30 days via torrent Can I make it work this time.

  • Pass Variables through case

    Hello! I'm writing a VI to control the material through a GPIB communication. The communication goes well. However, I would change that control vi is enabled for the user based on 'mode', the user selects. This mode is 1 in 3, and it would be determi