emnleer
Contributor
Contributor

PowerCLI 5 Get-Datastore CapacityGB and FreeSpaceGB Reversed?

I was writing a script earlier for a type of datastore health check, and using tab completion I realized there were 2 new members in the Datastore object, FreeSpaceGB and CapacityGB.  However, they appear to be reversed.  My free space shows up as 1008 GB and capacity shows up as 100 GB.  Has anyone else seen this?  Most of the scripts in the community appear to use CapacityMB and FreeSpaceMB.

I'm running PowerCLI Version 5 build 435427 and PowerShell v2

0 Kudos
1 Reply
LucD
Leadership
Leadership

Your observation is correct, the GB properties are indeed switched and hence incorrect.


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

0 Kudos