VMware Cloud Community
Pilu1978
Enthusiast
Enthusiast

Scratch Parttion Size

Hi,

Is it possible to get the current size of scratch partition of all the esxi hosts using powercli. Please help.

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

You could do something like this

Get-VMHost | Select Name,

    @{N='ScratchPartitionSizeGB';E={

        $esxcli = Get-EsxCli -VMHost $_ -V2

        $scratchPartition = Get-AdvancedSetting -Entity $_ -Name ScratchConfig.ConfiguredScratchLocation

        $fs = $esxcli.storage.filesystem.list.Invoke() | where{$_.MountPoint -eq $scratchPartition.Value}

        $fs.Size/1GB}}


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

Reply
0 Kudos