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

Re: Datastore Capacity

$
0
0

Hi Matt

 

Lucs FriendlyUnits function works great. I have one dilemma though. I can't seem to get it to work with the Get-View cmdlet:

 

Code:

Get-Datastore -Name DS1 |

Select Name,
@{N="Capacity";E={Get-FriendlyUnit -Value ($_.CapacityMB * 1MB) |
%{"{0,7:f2} {1,2}" -f $_.Value,$_.Unit}}},
@{N="FreeSpace";E={Get-FriendlyUnit -Value ($_.FreeSpaceMB * 1MB)

|
%{"{0,7:f2} {1,2}" -f $_.Value,$_.Unit}}},
@{N="ProvisionedSpace";E={Get-FriendlyUnit -Value

($_.ExtensionData.Summary.Capacity -

$_.ExtensionData.Summary.FreeSpace +

$_.ExtensionData.Summary.Uncommitted/1GB,0) |
%{"{0,7:f2} {1,2}" -f $_.Value,$_.Unit}}}

 

Maybe I'm not using the function properly with Get-View? Is there a way to get the Provisioned  space other than using Get-View?

 

Thanks


Viewing all articles
Browse latest Browse all 230777

Trending Articles



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