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

Provisioned, Used and Free Space information along with Thin / Thick provisioning information

$
0
0


Hi All,

 

I am currently using the below script to obtain VM Name, Disk Name, Disk format (Thick / Thin) for each disk for all the VMs in vCenter.

 

$report = @()

Get-VM | %{

     $vm= $_

    $_ | Get-HardDisk | %{

       $row = "" | Select VMname, HDname, HDformat

        $row.VMname = $vm.Name

       $row.HDname = $_.Name

        $row.HDformat = $_.StorageFormat

        $report += $row

   }

}

$report | Export-Csv "D:\Thin.csv" -NoTypeInformation -UseCulture

 

I want to have three more columns in this report to show the Provisioned space, Used Space and Free space corresponding to each hard disk of the VMs. Unable to find the right method. The ProvisionedSpaceGB and UsedSpaceGB in the Get-VM does not provide the provisioned and used space for each individual disk in the VM.

 

Can someone help me obtain the VM Name, Disk Name, Disk format (Thick / Thin), Provisioned Space, Used Space and Free Space for all the VMs in vCenter?

 

Thanks in advance.

 

Regards

Sudharson AN


Viewing all articles
Browse latest Browse all 179681

Trending Articles



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