Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

How to get Used Harddisk space + RDM Space of a VM

$
0
0

Hi All,

 

I would like to know, harddisk space used by VM both RDM + VMDK

 

I am getting the details using the below script,

 

Get-VM | Get-HardDisk |

Select @{N='VM Name';E={$_.Parent.Name}},

@{N="IP Address";E={@($_.Parent.guest.IPAddress[0])}},

@{N="VM PowerState";E={@($_.Parent.PowerState)}},

@{N="CPU Count";E={@($_.Parent.NumCPU)}},

@{N="MemoryInGB";E={@($_.Parent.MemoryGB)}},

@{N="Cluster";E={Get-Cluster -VM $_.Parent}},

@{N="ESX Host";E={Get-VMHost -VM $_.Parent}},

@{N="Folder";E={$_.Parent.Folder.Name}},

@{N='HD Capacity';E={$_.CapacityGB}},

@{N="Datastore";E={Get-Datastore -VM $_}},

 

I am looking for similar output as below

 

VM Name     IP Address     VM PowerState     CPU Count     MemoryinGB     Cluster     ESXHost     Folder     HD Capacity(VMDK+RDM)     Datastore

VM1             10.10.10.10     PoweredON          4                    8                       ABC      11.11.11.11   ABC         2048                                   Datastore 1

VM2          10.10.10.11   PoweredON        4                   8                    ABC      11.11.11.13   ABC         3096                                 Datastore 2

Viewing all articles
Browse latest Browse all 219257

Trending Articles



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