VMware Cloud Community
mekmiotek
Contributor
Contributor

Powercli to get total storage, and free storage, based off of CLUSTER

Hi All,

I'm trying to get a powercli script that can get me total storage and free storage for every cluster in a datacenter. The info I need is located on the summary page of the vsphere web client, upper right side when a cluster is highlighted, just storage info.

Any help would be great, thanks.

MK

Reply
0 Kudos
3 Replies
mekmiotek
Contributor
Contributor

ok so if you don't need to write a script for something, then don't!

If anyone else needs this information, in the vsphere web client, if you click on the VC server at the top, and click the clusters tab, you can show just the columns needed, like Available storage and total storage.

Thanks for your time!

Reply
0 Kudos
mekmiotek
Contributor
Contributor

The story always changes....

Maybe a script is in order....

Anyway I can get this information, excluding local datastores?

The output I have is as follows, but includes local where I need that excluded:

NameAvailable Storage (GB)Total Storage (GB)
devesxndcl0110,585.88  GB24,549.75  GB
genprodbp2,603.44  GB8,340.25  GB
genprodps4,076.2  GB9,017.5  GB
genstage3,043.11  GB7,108.25  GB
mgmtcl014,414.62  GB8,120.75  GB
prodesxcl0111,563.58  GB28,257.75  GB
prodesxcl0213,556.42  GB35,223  GB
prodesxcl0313,002.79  GB28,976.75  GB
prodesxcl0410,655.39  GB30,633  GB
prodesxcl056,401.01  GB18,538.25  GB

Thanks!

Reply
0 Kudos
LucD
Leadership
Leadership

Try like this

Get-Datastore | where{$_.ExtensionData.Summary.multipleHostAccess} |

Select Name,FreeSpaceMB,CapacityMB


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos