VMware Cloud Community
gazjay2093103
Contributor
Contributor

How to access the file type info shown in the space utlization page of a datastore.

I'm interested in the break down of each file type, particular snapshot space used across about 50disks. Would be great to be able to access this data and pump it into one page.

I've been looking through "Get-view -viewtype datastore" but can't seem anything that breaks this data into file types like the attached image shows.

0 Kudos
2 Replies
LucD
Leadership
Leadership

You can start from here

$vm = Get-VM Name MyVM

$vm.ExtensionData.LayoutEx.File

A second option is to use the vimdatastore psprovider.

$vm = Get-VM -Name MyVM

$ds = $vm | Get-Datastore

New-PSDrive -Location $ds -Name DS -PSProvider VimDatastore -Root '\'

Get-ChildItem -Path "DS:\$($vm.Name)"

Remove-PSDrive -Name DS -Confirm:$false


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

0 Kudos
gazjay2093103
Contributor
Contributor

Thanks. I went with the first option. 
0 Kudos