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

Re: Script to get infomration of datastore per cluster

$
0
0

Sure, try like this

 

$VCName=Read-Host"Enter the VC name "

Connect-VIServer VCname -WarningAction Continue

clear


Get-Cluster|ForEach-Object-Process {

   $cluster=$_

   Get-Datastore-RelatedObject $cluster|

   where{$_.name-notlike"*local*"-and$_.name-notlike"*template*"}|

  Select @{N='Cluster';E={$cluster.Name}}, Name, CapacityGB, FreespaceGB,@{N='UsedSpace';E={$_.FreeSpaceGB/$_.CapacityGB*100}}

}|Format-Table-AutoSize


Viewing all articles
Browse latest Browse all 235209

Trending Articles



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