Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180923

Getting the value 0 for memory size

$
0
0

Here's my script....

$myCol = @()

foreach ($cluster in Get-Cluster)

    {

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

        {

            foreach($vm in (Get-VM -Location $vmhost)){

                $VMView = $vm | Get-View

                $VMSummary = "" | Select ClusterName,VMName,MemorySize,VMSockets,VMCores

                $VMSummary.ClusterName = $cluster.Name

                $VMSummary.VMName = $vm.Name

                $VMSummary.MemorySize = $VMView.Hardware.Config.MemorySize / 1024

                $VMSummary.VMSockets = $VMView.Config.Hardware.NumCpu

                $VMSummary.VMCores = $VMView.Config.Hardware.NumCoresPerSocket

                $myCol += $VMSummary

            }

        }

    }

    $myCol | Export-Csv C:\Temp\Test.txt

 

The column "MemorySize" is returning 0 for all VM's...

"DMZ","Trend Micro Deep Security (1)","0","2","1"

"DMZ","Guest Introspection (1)","0","2","1"

 

Any ideas?


Viewing all articles
Browse latest Browse all 180923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>