Microsoft Virtualization Discussions

equivalent to running df -hr


hello all

whats the equivalent command in powershell toolkit for the "DF -HR" command



You actually need more than two commands to get all of the info you are looking for:

Get-NaVol will return the volume size and most properties about it.  Get-NaVolsize works too, and is more specific.

Get-NaSnapshotReserve gets the reserve amount.

To get the closest output to DF -HR, try this:

Get-NaVol | FT -autosize Name,@{ "l" = "SizeGB"; "e" = { "{0:#,##0}" -f ($_.SizeTotal / 1gb) } },@{ "l" = "SizeUsedGB"; "e" = { "{0:#,##0}" -f ($_.SizeUsed / 1gb) } },@{ "l" = "SizeAvailGB"; "e" = { "{0:#,##0}" -f ($_.SizeAvailable / 1gb) } },@{ "l" = "SizeReservedGB"; "e" = { "{0:#,##0}" -f (($_ | Get-NaSnapshotReserve).Size / 1gb) } }


I think what you are looking for is going to be get-navolsize.  However if you wish to manipulate the data once you have it, that is more complicated.


edit: This appears to be dependent on the version of the toolkit.  On one laptop I cannot use get-navolsize because of the human readable out, on my current laptop I am getting the raw size output.

Message was edited by: Scott Chubb

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner