NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

Microsoft Virtualization Discussions

equivalent to running df -hr

SKIP_HOFMANN
5,059 Views

hello all

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

2 REPLIES 2

cscott
5,059 Views

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.

-Scott

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

bsti
5,059 Views

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) } }

Public