Please enable Javascript for better experience...
 
Script - How to Generate Data Store Utilization Report Cluster Wise
By Vikas Pandey | May 29, 2019 | In Articles | Total Views [ 3690 ]
Taged In
(0 Like)
Rate

$report = @()

foreach($cluster in Get-Cluster){
    Get-VMHost -Location $cluster | Get-Datastore | %{
        $info = "" | select DataCenter, Cluster, Name, Capacity, Provisioned, Available,Percentfree
        $info.Datacenter = $_.Datacenter
        $info.Cluster = $cluster.Name
        $info.Name = $_.Name
        $info.Capacity = [math]::Round($_.capacityMB/1024,2)
        $info.Provisioned = [math]::Round(($_.ExtensionData.Summary.Capacity - $_.ExtensionData.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted)/1GB,2)
        $info.Available = [math]::Round($info.Capacity - $info.Provisioned,2)
        $info.Percentfree = [math]::Round(((100* ($info.Available))/ ($info.Capacity)),0)
        $report += $info
    }
}

$report | Export-Csv "C:\Datastore report.csv" -NoTypeInformation -UseCulture

Thanks for visiting here. Share this article if you found it useful.
Like Facebook Page https://www.facebook.com/VMwareInsight/
Connect to twitter https://twitter.com/imPranayK
Subscribe my Channel https://www.youtube.com/vmwareinsight
Connect over Linkedin https://in.linkedin.com/in/impranayk
Share this on Social Media

About the Author

Vikas Pandey
Vikas Pandey
Contributer VMwareInsight.com

Public profile: user/profile/99900031


Follow me

facebook linkedin twitter G+ VMTN youtube


 
Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Comment
 
Sponsors
 
 
 
 
 
Facebook Likes